Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service[T any] struct { // contains filtered or unexported fields }
Service wraps a connection to an external service with reconnection capabilities
func (*Service[T]) Connect ¶
Connect attempts to connect to the service, retrying every 500ms for 3 seconds
func (*Service[T]) ConnectedChan ¶
func (*Service[T]) IsConnected ¶
IsConnected returns whether the service is currently connected
func (*Service[T]) StartReconnectLoop ¶
StartReconnectLoop starts a goroutine that attempts to connect periodically, to check whether the service is still available.
Click to show internal directories.
Click to hide internal directories.