Documentation ¶
Index ¶
- Variables
- func CloseDiscoveryServer(ctx context.Context) error
- func ConnectToDiscoveryServer(ctx context.Context, c *DiscoveryServerConfig) error
- func Receive[M messages.Message](d *DiscoveryServer) (M, error)
- func ReconnectDiscoveryServer(ctx context.Context) error
- func Send[M messages.Message](d *DiscoveryServer, m M) error
- func SendArrivalToDiscoveryServer(ctx context.Context, arrival *messages.ServerArrivalRequest) error
- func SendReportToDiscoveryServer(ctx context.Context, report *messages.Report)
- func WithDiscoveryServer(ctx context.Context) (context.Context, <-chan struct{})
- type DiscoveryServer
- type DiscoveryServerConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClosedByUser = errors.New("closed by user")
View Source
var ErrHandshakeTimeout = errors.New("handshake timed out")
Functions ¶
func CloseDiscoveryServer ¶
func ConnectToDiscoveryServer ¶
func ConnectToDiscoveryServer(ctx context.Context, c *DiscoveryServerConfig) error
ConnectToDiscoveryServer connects to the discovery server and sends a handshake. The connection is kept open and stuffed into the context.
func SendArrivalToDiscoveryServer ¶
func SendArrivalToDiscoveryServer(ctx context.Context, arrival *messages.ServerArrivalRequest) error
Types ¶
type DiscoveryServer ¶
type DiscoveryServer struct { AssignedURL string AcceptsReport bool // contains filtered or unexported fields }
func GetDiscoveryServer ¶
func GetDiscoveryServer(ctx context.Context) *DiscoveryServer
func (*DiscoveryServer) Close ¶
func (d *DiscoveryServer) Close() error
func (*DiscoveryServer) Stream ¶
func (d *DiscoveryServer) Stream() proto.SignallingServer_ConnectClient
Click to show internal directories.
Click to hide internal directories.