Documentation
¶
Overview ¶
Package channel provides various channel types used for event.
Index ¶
- type DataChan
- type ListenerChannel
- func (s *ListenerChannel) Done()
- func (s *ListenerChannel) GetChannel(sequenceID int) chan<- cloudevents.Event
- func (s *ListenerChannel) Listen(wg *sync.WaitGroup)
- func (s *ListenerChannel) SendToCaller(sequenceID int, dataCh cloudevents.Event)
- func (s *ListenerChannel) SendToListener(fromRest RestAPIChannel)
- func (s *ListenerChannel) SetChannel(seq int, dataCh chan<- cloudevents.Event)
- type RestAPIChannel
- type Status
- type StatusChan
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataChan ¶
type DataChan struct { ID string ClientID uuid.UUID Address string Data *cloudevents.Event Status Status //Type defines type of data (Notification,Metric,Status) Type Type // OnReceiveFn to do on OnReceive OnReceiveFn func(e cloudevents.Event) // OnReceiveOverrideFn Optional for event, but override for status pings.This is an override function on receiving msg by transport, // if not set then the data is sent to out channel and processed by side-car default method OnReceiveOverrideFn func(e cloudevents.Event, dataChan *DataChan) error // ProcessEventFn Optional, this allows to customize message handler thar was received at the out channel ProcessEventFn func(e interface{}) error // Only for status lost if marshalled to json StatusChan chan<- *StatusChan ReturnAddress *string }
DataChan ...
func (*DataChan) CreateCloudEvents ¶ added in v0.2.0
func (d *DataChan) CreateCloudEvents(dataType string) (*cloudevents.Event, error)
CreateCloudEvents ...
type ListenerChannel ¶
type ListenerChannel struct {
// contains filtered or unexported fields
}
ListenerChannel ...
func NewStatusListenerChannel ¶
func NewStatusListenerChannel(wg *sync.WaitGroup) *ListenerChannel
NewStatusListenerChannel ...
func (*ListenerChannel) GetChannel ¶
func (s *ListenerChannel) GetChannel(sequenceID int) chan<- cloudevents.Event
GetChannel ...
func (*ListenerChannel) Listen ¶
func (s *ListenerChannel) Listen(wg *sync.WaitGroup)
Listen ... put in the map; so the you receiver will read the map and sequence id is found then send to channel found in the map
func (*ListenerChannel) SendToCaller ¶
func (s *ListenerChannel) SendToCaller(sequenceID int, dataCh cloudevents.Event)
SendToCaller ... TODO:Clean up store on errors SendToCaller ...
func (*ListenerChannel) SendToListener ¶
func (s *ListenerChannel) SendToListener(fromRest RestAPIChannel)
SendToListener ...
func (*ListenerChannel) SetChannel ¶
func (s *ListenerChannel) SetChannel(seq int, dataCh chan<- cloudevents.Event)
SetChannel ...
type RestAPIChannel ¶
type RestAPIChannel struct {
// contains filtered or unexported fields
}
RestAPIChannel ...
func NewStatusRestAPIChannel ¶
func NewStatusRestAPIChannel(seqID int, dataCh chan<- cloudevents.Event) RestAPIChannel
NewStatusRestAPIChannel ...
type StatusChan ¶ added in v0.2.0
type StatusChan struct { ID string ClientID uuid.UUID Data *cloudevents.Event Message []byte StatusCode int }
StatusChan channel used for writing status data out here
Click to show internal directories.
Click to hide internal directories.