Documentation
¶
Index ¶
Constants ¶
View Source
const ( MessageTypeEvent byte = iota MessageTypeSeqTable )
View Source
const Header = "CDR#PUBSUB@01"
Variables ¶
View Source
var ( FrameHeader = []byte(Header) FrameEventType = []byte{MessageTypeEvent} FrameSeqTableType = []byte{MessageTypeSeqTable} )
View Source
var ( ErrConfigIncomplete = errors.New("PubSub endpoint is not fully configured") ErrSeqNumNotSet = errors.New("Event sequence number is not set") )
Functions ¶
func NewEndpoint ¶
Types ¶
type Endpoint ¶
type Endpoint struct { *loop.MessageLoop // contains filtered or unexported fields }
type EndpointConfig ¶
type EndpointConfig struct { RouterEndpoint string RouterSndhwm int RouterRcvhwm int PubSndhwm int PubEndpoint string }
func NewEndpointConfig ¶
func NewEndpointConfig() *EndpointConfig
func (*EndpointConfig) FeedFromEnv ¶
func (config *EndpointConfig) FeedFromEnv(prefix string) error
func (*EndpointConfig) IsComplete ¶
func (config *EndpointConfig) IsComplete() bool
func (*EndpointConfig) MustBeComplete ¶
func (config *EndpointConfig) MustBeComplete()
func (*EndpointConfig) MustFeedFromEnv ¶
func (config *EndpointConfig) MustFeedFromEnv(prefix string) *EndpointConfig
type Event ¶
type Event [][]byte
FRAME 0: publisher (string) FRAME 1: event kind (string) FRAME 2: message header (string) FRAME 3: message type (byte) FRAME 4: event sequence number (uint32, BE) FRAME 5: event object, marshalled (bytes)
func (Event) SetSeq ¶
func (e Event) SetSeq(seq pubsub.EventSeqNum)
Click to show internal directories.
Click to hide internal directories.