Documentation ¶
Index ¶
- Constants
- type Callback
- type Dancer
- type EventLevel
- type Message
- func (msg *Message) Ack() bool
- func (msg *Message) Copy() *Message
- func (msg *Message) EnsureHeadersProvided(keys ...string) error
- func (msg *Message) GetAppendHeaders() string
- func (msg *Message) GetAppendHeadersList() []string
- func (msg *Message) GetAppendPayload() string
- func (msg *Message) GetAppendPayloadMapping() map[string]string
- func (msg *Message) GetAppendTracing() string
- func (msg *Message) GetContext() context.Context
- func (msg *Message) GetEvent() string
- func (msg *Message) GetHeader(key string) string
- func (msg *Message) GetHeaders() message.Metadata
- func (msg *Message) GetPayload() []byte
- func (msg *Message) GetPayloadPath(path string) json.RawMessage
- func (msg *Message) GetSaga() string
- func (msg *Message) GetSagaId() string
- func (msg *Message) GetStepId() string
- func (msg *Message) Nack() bool
- func (msg *Message) Raw() *message.Message
- func (msg *Message) SetAppendHeaders(h string) *Message
- func (msg *Message) SetAppendPayload(c map[string]string) *Message
- func (msg *Message) SetAppendPayloadRaw(c string) *Message
- func (msg *Message) SetAppendTracing(h string) *Message
- func (msg *Message) SetContext(ctx context.Context) *Message
- func (msg *Message) SetEvent(e string) *Message
- func (msg *Message) SetHeader(key, value string) *Message
- func (msg *Message) SetHeaders(headers map[string]string) *Message
- func (msg *Message) SetPayload(p []byte) *Message
- func (msg *Message) SetSaga(saga string) *Message
- func (msg *Message) SetSagaId(id string) *Message
- func (msg *Message) SetStepId(id string) *Message
- type Saga
- type SagaEvent
- type Step
Constants ¶
View Source
const ( HeaderContentType = "content-type" HeaderSaga = "x-choreographer-saga" HeaderSagaId = "x-choreographer-saga-id" HeaderStepId = "x-choreographer-step-id" HeaderEvent = "x-choreographer-event" HeaderAppendPayload = "x-choreographer-append-payload" HeaderAppendHeaders = "x-choreographer-append-headers" HeaderAppendTracing = "x-choreographer-append-tracing" ContentTypeJson = "application/json" ContentTypeProtobuf = "application/protobuf" SagaStartedEvent SagaEvent = "ChoreographerSagaStarted" SagaSucceededEvent SagaEvent = "ChoreographerSagaSucceeded" SagaFailedEvent SagaEvent = "ChoreographerSagaFailed" SagaFinishedEvent SagaEvent = "ChoreographerSagaFinished" StepStartedEvent SagaEvent = "ChoreographerStepStarted" StepSucceededEvent SagaEvent = "ChoreographerStepSucceeded" StepFailedEvent SagaEvent = "ChoreographerStepFailed" StepRollbackEvent SagaEvent = "ChoreographerStepRollback" StepFinishedEvent SagaEvent = "ChoreographerStepFinished" LevelSaga EventLevel = iota + 1 LevelStep )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dancer ¶
type Dancer struct {
// contains filtered or unexported fields
}
func New ¶
func New(sub message.Subscriber) (d Dancer)
type EventLevel ¶ added in v1.0.2
type EventLevel int
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
func NewMessage ¶
func NewMessage() *Message
func NewMessageRaw ¶
func (*Message) EnsureHeadersProvided ¶
func (*Message) GetAppendHeaders ¶
func (*Message) GetAppendHeadersList ¶
func (*Message) GetAppendPayload ¶
func (*Message) GetAppendPayloadMapping ¶
GetAppendPayloadMapping returns calculated append payload field mapping in form map[from field]to field
func (*Message) GetAppendTracing ¶ added in v1.0.2
func (*Message) GetContext ¶
func (*Message) GetHeaders ¶
func (*Message) GetPayload ¶
func (*Message) GetPayloadPath ¶
func (msg *Message) GetPayloadPath(path string) json.RawMessage
func (*Message) SetAppendHeaders ¶
func (*Message) SetAppendPayload ¶
func (*Message) SetAppendPayloadRaw ¶
func (*Message) SetAppendTracing ¶ added in v1.0.2
func (*Message) SetPayload ¶
Click to show internal directories.
Click to hide internal directories.