handlers

package
v0.0.0-...-ad0604f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const MaxNumberOfAsyncSenders = 10

Variables

Dispatcher service event dispatcher

Functions

func SendDiscoveryFinished

func SendDiscoveryFinished(id uuid.UUID, entries []*api.DiscoveryEntry, err error)

func SendDiscoveryStarted

func SendDiscoveryStarted(id uuid.UUID, protocol api.ProtocolIdentifier, transport api.TransportIdentifier, params api.RawParamValues)

func SendDropMessage

func SendDropMessage(service *api.ServiceKey, message *api.Message)

SendDropMessage sends DropMessage event

func SendNewMessage

func SendNewMessage(service *api.ServiceKey, message *api.Message)

SendNewMessage sends NewMessage event

func SendUpdateMessageState

func SendUpdateMessageState(service *api.ServiceKey, message *api.Message, prevState api.MessageState)

SendUpdateMessageState sends UpdateMessageState event

Types

type AddService

type AddService struct {
	RequestHeader
	*api.ServiceEntry
}

AddService - add new service

type AddServiceResult

type AddServiceResult struct {
	ResponseHeader
	*api.StatusReply
}

AddServiceResult - add new service result

type ChangeServiceAlias

type ChangeServiceAlias struct {
	RequestHeader
	*api.ChangeServiceAlias
}

ChangeServiceAlias - change service alias request

type ChangeServiceAliasResult

type ChangeServiceAliasResult struct {
	ResponseHeader
	*api.StatusReply
}

ChangeServiceAlias - change service alias result

type ConfigGet

type ConfigGet struct {
	RequestHeader
}

ConfigGet - get config event

type ConfigGetResult

type ConfigGetResult struct {
	ResponseHeader
	*api.Config
}

ConfigGetResult - config data event

type DropMessage

type DropMessage struct {
	Header
	*api.MessageEntry
}

DropMessage event sent when a message gets removed from message log

type GetMessage

type GetMessage struct {
	RequestHeader
	ID uuid.UUID
}

GetMessage - get message request

type GetMessageResult

type GetMessageResult struct {
	ResponseHeader
	*api.MessageEntry
}

GetMessageResult - get message result

type Header struct {
	// contains filtered or unexported fields
}

Header - event header struct

func NewHeader

func NewHeader(traceID string) *Header

NewHeader function creates new header and allocates next ordinal

func (*Header) Associate

func (h *Header) Associate() Header

Associate - implementation of TraceFlow

func (*Header) InitTrace

func (h *Header) InitTrace(traceID string)

InitTrace - implementation of TraceSet

func (Header) Ordinal

func (h Header) Ordinal() Ordinal

Ordinal - implementation of TraceInfo

func (Header) TraceID

func (h Header) TraceID() string

TraceID - implementation of TraceInfo

type ListMessages

type ListMessages struct {
	RequestHeader
	*api.ListMessages
}

ListMessages defines list messages request

type ListMessagesResult

type ListMessagesResult struct {
	ResponseHeader
	*api.ListMessagesResult
}

ListMessagesResult defines list messages result

type ListServices

type ListServices struct {
	RequestHeader
	*api.ListServices
}

ListServices - get list of services request

type ListServicesResult

type ListServicesResult struct {
	ResponseHeader
	*api.ListServicesResult
}

ListServicesResult - get list of services result envelope

type NewMessage

type NewMessage struct {
	Header
	*api.MessageEntry
}

NewMessage event contains information about new message

type Ordinal

type Ordinal uint32

Ordinal is atomically incremented number

var EventOrdinal Ordinal

EventOrdinal is atomically incremented event number

func (*Ordinal) Next

func (o *Ordinal) Next() Ordinal

Next function returns next ordinal number

func (Ordinal) String

func (o Ordinal) String() string

type ProtocolDiscover

type ProtocolDiscover struct {
	RequestHeader
	*api.ProtocolDiscover
}

ProtocolDiscover defines protocol discover query event

type ProtocolDiscoverResult

type ProtocolDiscoverResult struct {
	ResponseHeader
	*api.ProtocolDiscoverResult
}

ProtocolDiscoverResult - discover query results

type ProtocolDiscovery

type ProtocolDiscovery struct {
	RequestHeader
	*api.ProtocolDiscovery
}

ProtocolDiscovery defines protocol discovery event

type ProtocolDiscoveryFinished

type ProtocolDiscoveryFinished struct {
	Header
	*api.ProtocolDiscoveryResult
}

ProtocolDiscoveryFinished event contains discovery query results

type ProtocolDiscoveryResult

type ProtocolDiscoveryResult struct {
	ResponseHeader
	*api.ProtocolDiscoveryResult
}

ProtocolDiscoveryResult defines protocol discovery result event

type ProtocolDiscoveryStarted

type ProtocolDiscoveryStarted struct {
	Header
	*api.ProtocolDiscoveryStarted
}

ProtocolDiscoveryStarted event contains information about started discovery query

type ProtocolInfo

type ProtocolInfo struct {
	RequestHeader
	*api.ProtocolInfo
}

ProtocolInfo - get protocol(s) detailed information

type ProtocolInfoResult

type ProtocolInfoResult struct {
	ResponseHeader
	*api.ProtocolInfoResult
}

ProtocolInfoResult - the response to get list of all available transports despite the protocol

type ProtocolList

type ProtocolList struct {
	RequestHeader
}

ProtocolList - get list of supported protocols request

type ProtocolListResult

type ProtocolListResult struct {
	ResponseHeader
	*api.ProtocolListResult
}

ProtocolListResult - get list of supported protocols response

type RemoveService

type RemoveService struct {
	RequestHeader
	*api.ServiceID
}

RemoveService - remove service request

type RemoveServiceResult

type RemoveServiceResult struct {
	ResponseHeader
	*api.StatusReply
}

RemoveServiceResult - remove service result

type RequestHeader

type RequestHeader struct {
	Header
	events.RequestTarget
}

RequestHeader - combined header of the request in the request-response pair

func NewRequestHeader

func NewRequestHeader(ID string) *RequestHeader

NewRequestHeader function creates new request header and allocates next ordinal

func (*RequestHeader) Associate

func (h *RequestHeader) Associate() ResponseHeader

Associate - implementation of TraceFlow

func (*RequestHeader) InitTrace

func (h *RequestHeader) InitTrace(traceID string)

InitTrace - implementation of TraceSet

type ResponseHeader

type ResponseHeader struct {
	Header
	events.ResponseTarget
}

ResponseHeader - combined header of the response in the request-response pair

type Restart

type Restart struct {
	RequestHeader
}

Restart - restart the service

type RestartResult

type RestartResult struct {
	ResponseHeader
}

RestartResult - restart the service result

type SendToService

type SendToService struct {
	RequestHeader
	*api.SendToService
}

SendToService - send message to service

type SendToServiceResult

type SendToServiceResult struct {
	ResponseHeader
	*api.SendToServiceResult
}

SendToServiceResult - send message to service result

type ServiceStatus

type ServiceStatus struct {
	RequestHeader
	*api.ServiceID
}

ServiceStatus - get service status

type ServiceStatusResult

type ServiceStatusResult struct {
	ResponseHeader
	*api.StatusReply
}

ServiceStatusResult - get service status

type Task

type Task struct {
	// contains filtered or unexported fields
}

Task struct

func NewTask

func NewTask() *Task

NewTask func

func (*Task) Close

func (t *Task) Close(ctx *tasks.ServiceTaskContext) error

Close func

func (*Task) Open

func (t *Task) Open(ctx *tasks.ServiceTaskContext) error

Open func

func (*Task) Stop

func (t *Task) Stop(ctx *tasks.ServiceTaskContext)

Stop func

type TraceFlow

type TraceFlow interface {
	Associate() TraceFlow
}

TraceFlow interface

type TraceInfo

type TraceInfo interface {
	Ordinal() Ordinal
	TraceID() string
}

TraceInfo interface

type TraceSet

type TraceSet interface {
	InitTrace(traceID string)
}

TraceSet interface

type TransportList

type TransportList struct {
	RequestHeader
}

TransportList - get list of all available transports despite the protocol

type TransportListResult

type TransportListResult struct {
	ResponseHeader
	*api.TransportListResult
}

TransportListResult - the response to get list of all available transports despite the protocol

type UpdateMessageState

type UpdateMessageState struct {
	Header
	*api.UpdateMessageState
}

UpdateMessageState event notifies about message state change

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL