Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnimplementedFunction = newError("unimplemented function") ErrUnknownGrpcRequest = newError("unknown gRPC request") )
View Source
var ( ErrSubscribeTimeout = newError("subscribe timeout") ErrClosed = newError("closed") ErrNoEvent = newError("no event") )
Functions ¶
func NewSubscriber ¶
Types ¶
type Connection ¶
type Connection interface {
Handle(handlerFn HandlerFn) error
Close()
Subscribe(ctx context.Context, groupId string, topics []string) error
EventHandled(ctx context.Context, tenantId string, topic string, errorMessage string) error
}
func NewConnection ¶
func NewConnection( ctx context.Context, deploymentId int64, client managementpb.ServiceClient, logger golog.Logger, config *config.Config, ) (Connection, error)
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
func NewEndpoint ¶
func (*Endpoint) OnSubscribed ¶
func (e *Endpoint) OnSubscribed(handler OnSubscribedFn)
func (*Endpoint) UseConnection ¶
func (e *Endpoint) UseConnection(connection Connection) error
type HandlerFn ¶
type HandlerFn func(response *managementpb.SubscribeResponse) error
type OnEventFn ¶
type OnEventFn func(event *managementpb.Event, connection Connection) error
type OnPanicFn ¶
type OnPanicFn func(panic *managementpb.Panic) error
type OnSubscribedFn ¶
type OnSubscribedFn func(subscribed *managementpb.Subscribed) error
Click to show internal directories.
Click to hide internal directories.