Package polling

import "github.com/matrix-org/go-neb/polling"

Overview ▾

func SetClients

func SetClients(clis *clients.Clients)

SetClients sets a pool of clients for passing into OnPoll

func Start

func Start() error

Start polling already existing services

func StartPolling

func StartPolling(service types.Service) error

StartPolling begins a polling loop for this service. If one already exists for this service, it will be instructed to die. The new poll will not wait for this to happen, so there may be a brief period of overlap. It is safe to immediately call `StopPolling(service)` to immediately terminate this poll.

func StopPolling

func StopPolling(service types.Service)

StopPolling stops all pollers for this service.