Documentation ¶
Index ¶
- type Event
- type EventReceived
- type EventsClient
- type EventsSubscription
- func (s *EventsSubscription) SetChannel(value string) *EventsSubscription
- func (s *EventsSubscription) SetGroup(value string) *EventsSubscription
- func (s *EventsSubscription) SetOnError(value func(err error)) *EventsSubscription
- func (s *EventsSubscription) SetOnReceiveEvent(fn func(event *EventReceived)) *EventsSubscription
- func (s *EventsSubscription) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Id string `json:"id"` Channel string `json:"channel"` Metadata string `json:"metadata"` Body []byte `json:"body"` Tags map[string]string `json:"tags"` }
func (*Event) SetChannel ¶
func (*Event) SetMetadata ¶
type EventReceived ¶
type EventsClient ¶
type EventsClient struct {
// contains filtered or unexported fields
}
func NewEventsClient ¶
func NewEventsClient(kubemqClient pb.KubemqClient, clientId string) *EventsClient
func (*EventsClient) Subscribe ¶
func (e *EventsClient) Subscribe(ctx context.Context, request *EventsSubscription, errCh chan error)
type EventsSubscription ¶
type EventsSubscription struct { Channel string Group string OnReceiveEvent func(event *EventReceived) OnError func(err error) }
func NewEventsEventSubscription ¶
func NewEventsEventSubscription() *EventsSubscription
func (*EventsSubscription) SetChannel ¶
func (s *EventsSubscription) SetChannel(value string) *EventsSubscription
func (*EventsSubscription) SetGroup ¶
func (s *EventsSubscription) SetGroup(value string) *EventsSubscription
func (*EventsSubscription) SetOnError ¶
func (s *EventsSubscription) SetOnError(value func(err error)) *EventsSubscription
func (*EventsSubscription) SetOnReceiveEvent ¶
func (s *EventsSubscription) SetOnReceiveEvent(fn func(event *EventReceived)) *EventsSubscription
func (*EventsSubscription) Validate ¶
func (s *EventsSubscription) Validate() error
Click to show internal directories.
Click to hide internal directories.