Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionHandlerFn ¶
type ConnectionHandlerFn[T ServiceClient] func(address string, client T) bool
ConnectionHandlerFn returns true if the next connection can be handled. Return false if you do not want to handle the next connection.
type CreateServiceClientFn ¶
type CreateServiceClientFn[T ServiceClient] func(cc grpc.ClientConnInterface) T
type PeerLeaveHandler ¶
type PeerLeaveHandler func(address string)
type PeerPool ¶
type PeerPool[T ServiceClient] interface { IsPeer(address string) bool Iterate(ctx context.Context, handler ConnectionHandlerFn[T]) error OnPeerLeave(handler PeerLeaveHandler) }
type ServiceClient ¶
type ServiceClient any
Click to show internal directories.
Click to hide internal directories.