api

package
v4.0.0-...-7e265f1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 26 Imported by: 6

Documentation

Overview

This code was autogenerated from xbus/xbus.proto, do not edit.

Index

Constants

View Source
const (
	// XbusAPIPrefix is the common prefix of all the nats subjects of the
	// xbus API.
	XbusAPIPrefix = "xbus.default."

	// ProtocolVersion is the xbus protocol version supported by this
	// implementation
	ProtocolVersion = "3.0"
)
View Source
const (
	// ActionCreate is the subject suffix for create operations
	ActionCreate = "create"
	// ActionUpdate is the subject suffix for update operations
	ActionUpdate = "update"
	// ActionDelete is the subject suffix for delete operations
	ActionDelete = "delete"
	// ActionQuery is the subject suffix for query operations
	ActionQuery = "query"

	// ServicesPrefix is the prefix for all service specific subjects
	ServicesPrefix = XbusAPIPrefix + "services."
)
View Source
const (
	// Msgbox is were envelopes are sent
	Msgbox = XbusAPIPrefix + "msgbox"

	// DefaultInput is the name of the default input
	DefaultInput = "default"
	// DefaultOutput is the name of the default output
	DefaultOutput = "default"
)
View Source
const (
	// EmissionServicePrefix is the prefix for the emission service
	EmissionServicePrefix = ServicesPrefix + "emission."

	// EmissionSignalSubjet is the subject for sending EmissionSignal messages
	EmissionSignalSubjet = EmissionServicePrefix + "signal"
)
View Source
const (
	// ClientPrefix is the prefix for client api subjects
	ClientPrefix = XbusAPIPrefix + "client."
)
View Source
const (
	// ProcessStatePrefix is the prefix for process state apis
	ProcessStatePrefix = XbusAPIPrefix + "processstate."
)
View Source
const RegistrationSubject = XbusAPIPrefix + "registration"

RegistrationSubject is the subject for registration requests

Variables

View Source
var (
	ErrDuplicateID   = errors.New("duplicate id")
	ErrClosedMessage = errors.New("message closed")
	ErrLastMessage   = errors.New("last message")
	ErrNoSuchMessage = errors.New("no such message")
	ErrChecksum      = errors.New("checksum error")
)
View Source
var (
	LogLevel_name = map[int32]string{
		0: "NOTICE",
		1: "WARNING",
		2: "ERROR",
	}
	LogLevel_value = map[string]int32{
		"NOTICE":  0,
		"WARNING": 1,
		"ERROR":   2,
	}
)

Enum value maps for LogLevel.

View Source
var (
	Account_Status_name = map[int32]string{
		0: "NOSTATUS",
		1: "PENDING",
		2: "ENABLED",
		3: "DISABLED",
	}
	Account_Status_value = map[string]int32{
		"NOSTATUS": 0,
		"PENDING":  1,
		"ENABLED":  2,
		"DISABLED": 3,
	}
)

Enum value maps for Account_Status.

View Source
var (
	Account_Type_name = map[int32]string{
		0: "NOTYPE",
		1: "ACTOR",
		2: "USER",
		3: "GATEWAY",
	}
	Account_Type_value = map[string]int32{
		"NOTYPE":  0,
		"ACTOR":   1,
		"USER":    2,
		"GATEWAY": 3,
	}
)

Enum value maps for Account_Type.

View Source
var (
	Account_CSROrigin_name = map[int32]string{
		0: "ANONYMOUS",
		1: "AUTHACCOUNT",
	}
	Account_CSROrigin_value = map[string]int32{
		"ANONYMOUS":   0,
		"AUTHACCOUNT": 1,
	}
)

Enum value maps for Account_CSROrigin.

View Source
var (
	Actor_Kind_name = map[int32]string{
		0: "CONSUMER",
		1: "EMITTER",
		2: "WORKER",
	}
	Actor_Kind_value = map[string]int32{
		"CONSUMER": 0,
		"EMITTER":  1,
		"WORKER":   2,
	}
)

Enum value maps for Actor_Kind.

View Source
var (
	Actor_Status_name = map[int32]string{
		0: "PENDING",
		1: "ENABLED",
		2: "DISABLED",
		3: "REJECTED",
	}
	Actor_Status_value = map[string]int32{
		"PENDING":  0,
		"ENABLED":  1,
		"DISABLED": 2,
		"REJECTED": 3,
	}
)

Enum value maps for Actor_Status.

View Source
var (
	EnvelopeEvent_Status_name = map[int32]string{
		0: "UNKNOWN",
		1: "RECEIVING",
		3: "COMPLETE",
		4: "ERROR",
		5: "STALLED",
	}
	EnvelopeEvent_Status_value = map[string]int32{
		"UNKNOWN":   0,
		"RECEIVING": 1,
		"COMPLETE":  3,
		"ERROR":     4,
		"STALLED":   5,
	}
)

Enum value maps for EnvelopeEvent_Status.

View Source
var (
	EnvelopeAck_ReceptionStatus_name = map[int32]string{
		0: "NOSTATUS",
		1: "RECEIVING",
		2: "ACCEPTED",
		3: "ERROR",
	}
	EnvelopeAck_ReceptionStatus_value = map[string]int32{
		"NOSTATUS":  0,
		"RECEIVING": 1,
		"ACCEPTED":  2,
		"ERROR":     3,
	}
)

Enum value maps for EnvelopeAck_ReceptionStatus.

View Source
var (
	PipelineInfo_Status_name = map[int32]string{
		0: "DRAFT",
		1: "ACTIVE",
		2: "INACTIVE",
	}
	PipelineInfo_Status_value = map[string]int32{
		"DRAFT":    0,
		"ACTIVE":   1,
		"INACTIVE": 2,
	}
)

Enum value maps for PipelineInfo_Status.

View Source
var (
	PMProcess_Status_name = map[int32]string{
		0: "DEFAULT",
		1: "NEW",
		2: "OPENED",
		3: "CLOSED",
	}
	PMProcess_Status_value = map[string]int32{
		"DEFAULT": 0,
		"NEW":     1,
		"OPENED":  2,
		"CLOSED":  3,
	}
)

Enum value maps for PMProcess_Status.

View Source
var (
	Process_Status_name = map[int32]string{
		0: "NOSTATUS",
		1: "INITIAL",
		2: "RUNNING",
		3: "PAUSED",
		4: "DONE",
		5: "ERROR",
	}
	Process_Status_value = map[string]int32{
		"NOSTATUS": 0,
		"INITIAL":  1,
		"RUNNING":  2,
		"PAUSED":   3,
		"DONE":     4,
		"ERROR":    5,
	}
)

Enum value maps for Process_Status.

View Source
var (
	Registration_Status_name = map[int32]string{
		0: "PENDING",
		1: "ACCEPTED",
		2: "REJECTED",
	}
	Registration_Status_value = map[string]int32{
		"PENDING":  0,
		"ACCEPTED": 1,
		"REJECTED": 2,
	}
)

Enum value maps for Registration_Status.

View Source
var (
	ActorProcessingState_Status_name = map[int32]string{
		0: "PENDING",
		1: "RUNNING",
		2: "SUCCESS",
		3: "ERROR",
	}
	ActorProcessingState_Status_value = map[string]int32{
		"PENDING": 0,
		"RUNNING": 1,
		"SUCCESS": 2,
		"ERROR":   3,
	}
)

Enum value maps for ActorProcessingState_Status.

View Source
var (
	// EnvelopeMaxSize is an approximate maximum size of an envelope
	// A single Envelope should never exceed this size, or it could be
	// rejected by nats
	EnvelopeMaxSize = 750 * 1024 // 750K encrypted should be smaller than 1M
)
View Source
var File_xbus_xbus_proto protoreflect.FileDescriptor

Functions

func ActorInputSubject

func ActorInputSubject(id UUID, output string) string

ActorInputSubject returns the subject for an actor input

func ActorOutputSubject

func ActorOutputSubject(id UUID) string

ActorOutputSubject returns the subject for an actor output

func ClientProtoError

func ClientProtoError(msg string, fmtArgs ...interface{}) *nrpc.Error

ClientProtoError returns a client error nrpc.Error

func DecodeJSON

func DecodeJSON[T utils.JSONIterUnmarshaler](r io.Reader, value T) error

func EmitterEnvelopeStateSubject

func EmitterEnvelopeStateSubject(emitter UUID, envelopeID UUID) string

EmitterEnvelopeStateSubject returns the subject on which process events are sent

func EmitterMsgboxSubject

func EmitterMsgboxSubject(id UUID) string

EmitterMsgboxSubject returns the msgbox for an emitter

func ItemsAsChunks

func ItemsAsChunks(items []Item) [][]byte

ItemsAsChunks converts a slice of items into a slice of data chunks

func JSONIterItemReader

func JSONIterItemReader(encoding ItemEncoding) (func(*jsoniter.Iterator) Item, error)

func JSONIterReadItems

func JSONIterReadItems(iter *jsoniter.Iterator, encoding ItemEncoding) [][]byte

func JSONIterReadTimestamp

func JSONIterReadTimestamp(iter *jsoniter.Iterator) *timestamppb.Timestamp

func JSONMarshal

func JSONMarshal(encodings []ItemEncoding, value utils.JSONStreamMarshaler) ([]byte, error)

JSONMarshal encodes api messages to JSON. The encodings list controls how the api.Item will be encoded

func JSONMarshalToStream

func JSONMarshalToStream(
	encodings []ItemEncoding, value utils.JSONStreamMarshaler, stream *jsoniter.Stream,
) error

JSONMarshalToStream encodes api messages to JSON. The encodings list controls how the api.Item will be encoded

func JSONStreamItemWriter

func JSONStreamItemWriter(encoding ItemEncoding) func(stream *jsoniter.Stream, item []byte)

func JSONStreamWriteTimestamp

func JSONStreamWriteTimestamp(stream *jsoniter.Stream, t *timestamppb.Timestamp)

func JSONStreamWriteUUID

func JSONStreamWriteUUID(stream *jsoniter.Stream, id []byte)

func ServerProtoError

func ServerProtoError(err error) *nrpc.Error

ServerProtoError returns a server error nrpc.Error

func UUIDToStringOrWildcard

func UUIDToStringOrWildcard(value UUID) string

UUIDToStringOrWildcard return '*' if the value is zero, and the value.String() result otherwise

func UnmarshalJSON

func UnmarshalJSON[T utils.JSONIterUnmarshaler](data []byte, value T) error

func WhoAmISubjects

func WhoAmISubjects(apiKey string) (string, string)

WhoAmISubjects returns the subject/reply subjects for a WhoAmI req/rep

Types

type Account

type Account struct {
	ID []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// / Account name
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// / Account type
	Type Account_Type `protobuf:"varint,3,opt,name=type,proto3,enum=xbus.Account_Type" json:"type,omitempty"`
	// / Account status
	Status Account_Status `protobuf:"varint,4,opt,name=status,proto3,enum=xbus.Account_Status" json:"status,omitempty"`
	// / The certificate signing request
	CSR       string            `protobuf:"bytes,5,opt,name=csr,proto3" json:"csr,omitempty"`
	CSROrigin Account_CSROrigin `protobuf:"varint,8,opt,name=csrOrigin,proto3,enum=xbus.Account_CSROrigin" json:"csrOrigin,omitempty"`
	// / The account certificate
	Cert string `protobuf:"bytes,6,opt,name=cert,proto3" json:"cert,omitempty"`
	// The account api key
	ApiKey string `protobuf:"bytes,7,opt,name=apiKey,proto3" json:"apiKey,omitempty"`
	// contains filtered or unexported fields
}

func (*Account) Descriptor deprecated

func (*Account) Descriptor() ([]byte, []int)

Deprecated: Use Account.ProtoReflect.Descriptor instead.

func (*Account) GetApiKey

func (x *Account) GetApiKey() string

func (*Account) GetCSR

func (x *Account) GetCSR() string

func (*Account) GetCSROrigin

func (x *Account) GetCSROrigin() Account_CSROrigin

func (*Account) GetCert

func (x *Account) GetCert() string

func (*Account) GetID

func (x *Account) GetID() []byte

func (*Account) GetIDAsUUID

func (x *Account) GetIDAsUUID() UUID

func (*Account) GetName

func (x *Account) GetName() string

func (*Account) GetStatus

func (x *Account) GetStatus() Account_Status

func (*Account) GetType

func (x *Account) GetType() Account_Type

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) ProtoReflect

func (x *Account) ProtoReflect() protoreflect.Message

func (*Account) Reset

func (x *Account) Reset()

func (*Account) String

func (x *Account) String() string

type Account_CSROrigin

type Account_CSROrigin int32
const (
	Account_ANONYMOUS   Account_CSROrigin = 0
	Account_AUTHACCOUNT Account_CSROrigin = 1
)

func (Account_CSROrigin) Descriptor

func (Account_CSROrigin) Enum

func (Account_CSROrigin) EnumDescriptor deprecated

func (Account_CSROrigin) EnumDescriptor() ([]byte, []int)

Deprecated: Use Account_CSROrigin.Descriptor instead.

func (Account_CSROrigin) MarshalText

func (e Account_CSROrigin) MarshalText() ([]byte, error)

MarshalText serialize a Account_CSROrigin

func (Account_CSROrigin) Number

func (Account_CSROrigin) String

func (x Account_CSROrigin) String() string

func (Account_CSROrigin) Type

func (*Account_CSROrigin) UnmarshalText

func (e *Account_CSROrigin) UnmarshalText(data []byte) error

UnmarshalText parses a Account_CSROrigin string

type Account_Status

type Account_Status int32
const (
	Account_NOSTATUS Account_Status = 0
	Account_PENDING  Account_Status = 1
	Account_ENABLED  Account_Status = 2
	Account_DISABLED Account_Status = 3
)

func (Account_Status) Descriptor

func (Account_Status) Enum

func (x Account_Status) Enum() *Account_Status

func (Account_Status) EnumDescriptor deprecated

func (Account_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Account_Status.Descriptor instead.

func (Account_Status) MarshalText

func (e Account_Status) MarshalText() ([]byte, error)

MarshalText serialize a Account_Status

func (Account_Status) Number

func (Account_Status) String

func (x Account_Status) String() string

func (Account_Status) Type

func (*Account_Status) UnmarshalText

func (e *Account_Status) UnmarshalText(data []byte) error

UnmarshalText parses a Account_Status string

type Account_Type

type Account_Type int32
const (
	Account_NOTYPE  Account_Type = 0
	Account_ACTOR   Account_Type = 1
	Account_USER    Account_Type = 2
	Account_GATEWAY Account_Type = 3
)

func (Account_Type) Descriptor

func (Account_Type) Enum

func (x Account_Type) Enum() *Account_Type

func (Account_Type) EnumDescriptor deprecated

func (Account_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Account_Type.Descriptor instead.

func (Account_Type) MarshalText

func (e Account_Type) MarshalText() ([]byte, error)

MarshalText serialize a Account_Type

func (Account_Type) Number

func (Account_Type) String

func (x Account_Type) String() string

func (Account_Type) Type

func (*Account_Type) UnmarshalText

func (e *Account_Type) UnmarshalText(data []byte) error

UnmarshalText parses a Account_Type string

type AckResultRequest

type AckResultRequest struct {
	ProcessID []byte `protobuf:"bytes,1,opt,name=processID,proto3" json:"processID,omitempty"`
	// contains filtered or unexported fields
}

func (*AckResultRequest) Descriptor deprecated

func (*AckResultRequest) Descriptor() ([]byte, []int)

Deprecated: Use AckResultRequest.ProtoReflect.Descriptor instead.

func (*AckResultRequest) GetProcessID

func (x *AckResultRequest) GetProcessID() []byte

func (*AckResultRequest) GetProcessIDAsUUID

func (x *AckResultRequest) GetProcessIDAsUUID() UUID

func (*AckResultRequest) ProtoMessage

func (*AckResultRequest) ProtoMessage()

func (*AckResultRequest) ProtoReflect

func (x *AckResultRequest) ProtoReflect() protoreflect.Message

func (*AckResultRequest) Reset

func (x *AckResultRequest) Reset()

func (*AckResultRequest) String

func (x *AckResultRequest) String() string

type Actor

type Actor struct {
	ID           []byte                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name         string                 `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Kind         Actor_Kind             `protobuf:"varint,3,opt,name=kind,proto3,enum=xbus.Actor_Kind" json:"kind,omitempty"`
	Status       Actor_Status           `protobuf:"varint,4,opt,name=status,proto3,enum=xbus.Actor_Status" json:"status,omitempty"`
	AccountID    []byte                 `protobuf:"bytes,5,opt,name=accountID,proto3" json:"accountID,omitempty"`
	Roles        []string               `protobuf:"bytes,6,rep,name=roles,proto3" json:"roles,omitempty"`
	LastSeen     *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=lastSeen,proto3" json:"lastSeen,omitempty"`
	Online       bool                   `protobuf:"varint,9,opt,name=online,proto3" json:"online,omitempty"`
	Unresponsive bool                   `protobuf:"varint,10,opt,name=unresponsive,proto3" json:"unresponsive,omitempty"`
	Config       []*ConfigEntry         `protobuf:"bytes,11,rep,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

func (*Actor) Descriptor deprecated

func (*Actor) Descriptor() ([]byte, []int)

Deprecated: Use Actor.ProtoReflect.Descriptor instead.

func (*Actor) GetAccountID

func (x *Actor) GetAccountID() []byte

func (*Actor) GetAccountIDAsUUID

func (x *Actor) GetAccountIDAsUUID() UUID

func (*Actor) GetConfig

func (x *Actor) GetConfig() []*ConfigEntry

func (*Actor) GetConfigEntry

func (a *Actor) GetConfigEntry(key string) string

GetConfigEntry returns the value of the given entry, or "" if it does not exist

func (*Actor) GetID

func (x *Actor) GetID() []byte

func (*Actor) GetIDAsUUID

func (x *Actor) GetIDAsUUID() UUID

func (*Actor) GetKind

func (x *Actor) GetKind() Actor_Kind

func (*Actor) GetLastSeen

func (x *Actor) GetLastSeen() *timestamppb.Timestamp

func (*Actor) GetName

func (x *Actor) GetName() string

func (*Actor) GetOnline

func (x *Actor) GetOnline() bool

func (*Actor) GetRoles

func (x *Actor) GetRoles() []string

func (*Actor) GetStatus

func (x *Actor) GetStatus() Actor_Status

func (*Actor) GetUnresponsive

func (x *Actor) GetUnresponsive() bool

func (*Actor) ProtoMessage

func (*Actor) ProtoMessage()

func (*Actor) ProtoReflect

func (x *Actor) ProtoReflect() protoreflect.Message

func (*Actor) Reset

func (x *Actor) Reset()

func (*Actor) String

func (x *Actor) String() string

type ActorAgentClient

type ActorAgentClient struct {
	PkgSubject      string
	Subject         string
	SvcParamactorID string
	Encoding        string
	Timeout         time.Duration
	// contains filtered or unexported fields
}

func NewActorAgentClient

func NewActorAgentClient(nc nrpc.NatsConn, svcParamactorID string) *ActorAgentClient

func (*ActorAgentClient) Process

type ActorAgentHandler

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

ActorAgentHandler provides a NATS subscription handler that can serve a subscription using a given ActorAgentServer implementation.

func NewActorAgentConcurrentHandler

func NewActorAgentConcurrentHandler(workers *nrpc.WorkerPool, nc nrpc.NatsConn, s ActorAgentServer) *ActorAgentHandler

func (*ActorAgentHandler) Handler

func (h *ActorAgentHandler) Handler(msg *nats.Msg)

func (*ActorAgentHandler) SetEncodings

func (h *ActorAgentHandler) SetEncodings(encodings []string)

SetEncodings sets the output encodings when using a '*Publish' function

func (*ActorAgentHandler) Subject

func (h *ActorAgentHandler) Subject() string

type ActorAgentServer

type ActorAgentServer interface {
	Process(ctx context.Context, req *ActorProcessRequest, pushRep func(*ActorProcessingState)) error
}

ActorAgentServer is the interface that providers of the service ActorAgent should implement.

type ActorLogRequest

type ActorLogRequest struct {
	EnvelopeID []byte             `protobuf:"bytes,1,opt,name=envelopeID,proto3" json:"envelopeID,omitempty"`
	Context    *ProcessingContext `protobuf:"bytes,2,opt,name=Context,proto3" json:"Context,omitempty"`
	Messages   []*LogMessage      `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"`
	// contains filtered or unexported fields
}

func (*ActorLogRequest) Descriptor deprecated

func (*ActorLogRequest) Descriptor() ([]byte, []int)

Deprecated: Use ActorLogRequest.ProtoReflect.Descriptor instead.

func (*ActorLogRequest) GetContext

func (x *ActorLogRequest) GetContext() *ProcessingContext

func (*ActorLogRequest) GetEnvelopeID

func (x *ActorLogRequest) GetEnvelopeID() []byte

func (*ActorLogRequest) GetEnvelopeIDAsUUID

func (x *ActorLogRequest) GetEnvelopeIDAsUUID() UUID

func (*ActorLogRequest) GetMessages

func (x *ActorLogRequest) GetMessages() []*LogMessage

func (*ActorLogRequest) ProtoMessage

func (*ActorLogRequest) ProtoMessage()

func (*ActorLogRequest) ProtoReflect

func (x *ActorLogRequest) ProtoReflect() protoreflect.Message

func (*ActorLogRequest) Reset

func (x *ActorLogRequest) Reset()

func (*ActorLogRequest) String

func (x *ActorLogRequest) String() string

type ActorProcessRequest

type ActorProcessRequest struct {
	Context *ProcessingContext           `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"`
	Inputs  []*ActorProcessRequest_Input `protobuf:"bytes,2,rep,name=inputs,proto3" json:"inputs,omitempty"`
	// contains filtered or unexported fields
}

func (*ActorProcessRequest) Descriptor deprecated

func (*ActorProcessRequest) Descriptor() ([]byte, []int)

Deprecated: Use ActorProcessRequest.ProtoReflect.Descriptor instead.

func (*ActorProcessRequest) GetContext

func (x *ActorProcessRequest) GetContext() *ProcessingContext

func (*ActorProcessRequest) GetInputs

func (*ActorProcessRequest) MarshalJSONStream

func (x *ActorProcessRequest) MarshalJSONStream(stream *jsoniter.Stream)

func (*ActorProcessRequest) ProtoMessage

func (*ActorProcessRequest) ProtoMessage()

func (*ActorProcessRequest) ProtoReflect

func (x *ActorProcessRequest) ProtoReflect() protoreflect.Message

func (*ActorProcessRequest) Reset

func (x *ActorProcessRequest) Reset()

func (*ActorProcessRequest) String

func (x *ActorProcessRequest) String() string

func (*ActorProcessRequest) UnmarshalJSONIter

func (x *ActorProcessRequest) UnmarshalJSONIter(iter *jsoniter.Iterator)

type ActorProcessRequest_Input

type ActorProcessRequest_Input struct {

	// Name of the input
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// True if no envelope to expect
	Close bool `protobuf:"varint,2,opt,name=close,proto3" json:"close,omitempty"`
	// First envelope fragment if available
	Envelope *Envelope `protobuf:"bytes,3,opt,name=envelope,proto3" json:"envelope,omitempty"`
	// Envelope position
	Position *EnvelopePosition `protobuf:"bytes,4,opt,name=position,proto3" json:"position,omitempty"`
	// contains filtered or unexported fields
}

func (*ActorProcessRequest_Input) Descriptor deprecated

func (*ActorProcessRequest_Input) Descriptor() ([]byte, []int)

Deprecated: Use ActorProcessRequest_Input.ProtoReflect.Descriptor instead.

func (*ActorProcessRequest_Input) GetClose

func (x *ActorProcessRequest_Input) GetClose() bool

func (*ActorProcessRequest_Input) GetEnvelope

func (x *ActorProcessRequest_Input) GetEnvelope() *Envelope

func (*ActorProcessRequest_Input) GetName

func (x *ActorProcessRequest_Input) GetName() string

func (*ActorProcessRequest_Input) GetPosition

func (x *ActorProcessRequest_Input) GetPosition() *EnvelopePosition

func (*ActorProcessRequest_Input) MarshalJSONStream

func (x *ActorProcessRequest_Input) MarshalJSONStream(stream *jsoniter.Stream)

func (*ActorProcessRequest_Input) ProtoMessage

func (*ActorProcessRequest_Input) ProtoMessage()

func (*ActorProcessRequest_Input) ProtoReflect

func (*ActorProcessRequest_Input) Reset

func (x *ActorProcessRequest_Input) Reset()

func (*ActorProcessRequest_Input) String

func (x *ActorProcessRequest_Input) String() string

func (*ActorProcessRequest_Input) UnmarshalJSONIter

func (x *ActorProcessRequest_Input) UnmarshalJSONIter(iter *jsoniter.Iterator)

type ActorProcessingState

type ActorProcessingState struct {
	Context      *ProcessingContext          `protobuf:"bytes,2,opt,name=context,proto3" json:"context,omitempty"`
	Status       ActorProcessingState_Status `protobuf:"varint,3,opt,name=status,proto3,enum=xbus.ActorProcessingState_Status" json:"status,omitempty"`
	Messages     []*LogMessage               `protobuf:"bytes,4,rep,name=messages,proto3" json:"messages,omitempty"`
	ActorLeaving bool                        `protobuf:"varint,5,opt,name=ActorLeaving,proto3" json:"ActorLeaving,omitempty"`
	// contains filtered or unexported fields
}

func (*ActorProcessingState) Descriptor deprecated

func (*ActorProcessingState) Descriptor() ([]byte, []int)

Deprecated: Use ActorProcessingState.ProtoReflect.Descriptor instead.

func (*ActorProcessingState) GetActorLeaving

func (x *ActorProcessingState) GetActorLeaving() bool

func (*ActorProcessingState) GetContext

func (x *ActorProcessingState) GetContext() *ProcessingContext

func (*ActorProcessingState) GetMessages

func (x *ActorProcessingState) GetMessages() []*LogMessage

func (*ActorProcessingState) GetStatus

func (*ActorProcessingState) MarshalJSONStream

func (x *ActorProcessingState) MarshalJSONStream(stream *jsoniter.Stream)

func (*ActorProcessingState) ProtoMessage

func (*ActorProcessingState) ProtoMessage()

func (*ActorProcessingState) ProtoReflect

func (x *ActorProcessingState) ProtoReflect() protoreflect.Message

func (*ActorProcessingState) Reset

func (x *ActorProcessingState) Reset()

func (*ActorProcessingState) String

func (x *ActorProcessingState) String() string

func (*ActorProcessingState) UnmarshalJSONIter

func (x *ActorProcessingState) UnmarshalJSONIter(iter *jsoniter.Iterator)

type ActorProcessingState_Status

type ActorProcessingState_Status int32
const (
	ActorProcessingState_PENDING ActorProcessingState_Status = 0
	ActorProcessingState_RUNNING ActorProcessingState_Status = 1
	ActorProcessingState_SUCCESS ActorProcessingState_Status = 2
	ActorProcessingState_ERROR   ActorProcessingState_Status = 3
)

func (ActorProcessingState_Status) Descriptor

func (ActorProcessingState_Status) Enum

func (ActorProcessingState_Status) EnumDescriptor deprecated

func (ActorProcessingState_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use ActorProcessingState_Status.Descriptor instead.

func (ActorProcessingState_Status) MarshalText

func (e ActorProcessingState_Status) MarshalText() ([]byte, error)

MarshalText serialize a ActorProcessingState_Status

func (ActorProcessingState_Status) Number

func (ActorProcessingState_Status) String

func (ActorProcessingState_Status) Type

func (*ActorProcessingState_Status) UnmarshalText

func (e *ActorProcessingState_Status) UnmarshalText(data []byte) error

UnmarshalText parses a ActorProcessingState_Status string

type ActorReadyMsg

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

func (*ActorReadyMsg) Descriptor deprecated

func (*ActorReadyMsg) Descriptor() ([]byte, []int)

Deprecated: Use ActorReadyMsg.ProtoReflect.Descriptor instead.

func (*ActorReadyMsg) ProtoMessage

func (*ActorReadyMsg) ProtoMessage()

func (*ActorReadyMsg) ProtoReflect

func (x *ActorReadyMsg) ProtoReflect() protoreflect.Message

func (*ActorReadyMsg) Reset

func (x *ActorReadyMsg) Reset()

func (*ActorReadyMsg) String

func (x *ActorReadyMsg) String() string

type Actor_Kind

type Actor_Kind int32
const (
	Actor_CONSUMER Actor_Kind = 0
	Actor_EMITTER  Actor_Kind = 1
	Actor_WORKER   Actor_Kind = 2
)

func (Actor_Kind) Descriptor

func (Actor_Kind) Descriptor() protoreflect.EnumDescriptor

func (Actor_Kind) Enum

func (x Actor_Kind) Enum() *Actor_Kind

func (Actor_Kind) EnumDescriptor deprecated

func (Actor_Kind) EnumDescriptor() ([]byte, []int)

Deprecated: Use Actor_Kind.Descriptor instead.

func (Actor_Kind) MarshalText

func (e Actor_Kind) MarshalText() ([]byte, error)

MarshalText serialize a Actor_Kind

func (Actor_Kind) Number

func (x Actor_Kind) Number() protoreflect.EnumNumber

func (Actor_Kind) String

func (x Actor_Kind) String() string

func (Actor_Kind) Type

func (*Actor_Kind) UnmarshalText

func (e *Actor_Kind) UnmarshalText(data []byte) error

UnmarshalText parses a Actor_Kind string

type Actor_Status

type Actor_Status int32
const (
	Actor_PENDING  Actor_Status = 0
	Actor_ENABLED  Actor_Status = 1
	Actor_DISABLED Actor_Status = 2
	Actor_REJECTED Actor_Status = 3
)

func (Actor_Status) Descriptor

func (Actor_Status) Enum

func (x Actor_Status) Enum() *Actor_Status

func (Actor_Status) EnumDescriptor deprecated

func (Actor_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Actor_Status.Descriptor instead.

func (Actor_Status) MarshalText

func (e Actor_Status) MarshalText() ([]byte, error)

MarshalText serialize a Actor_Status

func (Actor_Status) Number

func (Actor_Status) String

func (x Actor_Status) String() string

func (Actor_Status) Type

func (*Actor_Status) UnmarshalText

func (e *Actor_Status) UnmarshalText(data []byte) error

UnmarshalText parses a Actor_Status string

type BrokerClient

type BrokerClient struct {
	PkgSubject      string
	Subject         string
	SvcParamactorID string
	Encoding        string
	Timeout         time.Duration
	// contains filtered or unexported fields
}

func NewBrokerClient

func NewBrokerClient(nc nrpc.NatsConn, svcParamactorID string) *BrokerClient

func (*BrokerClient) Output

func (c *BrokerClient) Output(req *OutputRequest) (*EnvelopeAck, error)

type BrokerHandler

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

BrokerHandler provides a NATS subscription handler that can serve a subscription using a given BrokerServer implementation.

func NewBrokerConcurrentHandler

func NewBrokerConcurrentHandler(workers *nrpc.WorkerPool, nc nrpc.NatsConn, s BrokerServer) *BrokerHandler

func NewBrokerHandler

func NewBrokerHandler(ctx context.Context, nc nrpc.NatsConn, s BrokerServer) *BrokerHandler

func (*BrokerHandler) Handler

func (h *BrokerHandler) Handler(msg *nats.Msg)

func (*BrokerHandler) SetEncodings

func (h *BrokerHandler) SetEncodings(encodings []string)

SetEncodings sets the output encodings when using a '*Publish' function

func (*BrokerHandler) Subject

func (h *BrokerHandler) Subject() string

type BrokerServer

type BrokerServer interface {
	Output(ctx context.Context, req *OutputRequest) (*EnvelopeAck, error)
}

BrokerServer is the interface that providers of the service Broker should implement.

type Checksum

type Checksum uint32

Checksum stores checksums

func (Checksum) AsUint32

func (c Checksum) AsUint32() uint32

func (Checksum) Update

func (c Checksum) Update(data []byte) Checksum

Update updates the checksum with more data

type Client

type Client struct {
	Director        *DirectorClient
	EnvelopeStorage *EnvelopeStorageClient
	ClientAPI       *ClientAPIClient
	WhoAmI          *WhoAmIClient
	ProcessState    *ProcessStateClient
	ActorAgent      *ActorAgentClient
	Broker          *BrokerClient
	CoreEvents      *CoreEventsClient
	SvcRegistration *SvcRegistrationClient
	Sentinel        *SentinelClient
	// contains filtered or unexported fields
}

func NewClient

func NewClient(nc nrpc.NatsConn) *Client

func (*Client) NewActorAgent

func (c *Client) NewActorAgent(
	actorID string,
) *ActorAgentClient

func (*Client) NewBroker

func (c *Client) NewBroker(
	actorID string,
) *BrokerClient

func (*Client) NewClientAPI

func (c *Client) NewClientAPI(
	accountID string,
) *ClientAPIClient

func (*Client) SetActorAgentParams

func (c *Client) SetActorAgentParams(
	actorID string,
)

func (*Client) SetBrokerParams

func (c *Client) SetBrokerParams(
	actorID string,
)

func (*Client) SetClientAPIParams

func (c *Client) SetClientAPIParams(
	accountID string,
)

func (*Client) SetEncoding

func (c *Client) SetEncoding(encoding string)

func (*Client) SetTimeout

func (c *Client) SetTimeout(t time.Duration)

type ClientAPIClient

type ClientAPIClient struct {
	PkgSubject        string
	Subject           string
	SvcParamaccountID string
	Encoding          string
	Timeout           time.Duration
	// contains filtered or unexported fields
}

func NewClientAPIClient

func NewClientAPIClient(nc nrpc.NatsConn, svcParamaccountID string) *ClientAPIClient

func (*ClientAPIClient) GetActors

func (c *ClientAPIClient) GetActors() (*ClientGetActorsReply, error)

func (*ClientAPIClient) GetSessionToken

func (c *ClientAPIClient) GetSessionToken(req *GetSessionTokenRequest) (*SessionToken, error)

type ClientAPIHandler

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

ClientAPIHandler provides a NATS subscription handler that can serve a subscription using a given ClientAPIServer implementation.

func NewClientAPIConcurrentHandler

func NewClientAPIConcurrentHandler(workers *nrpc.WorkerPool, nc nrpc.NatsConn, s ClientAPIServer) *ClientAPIHandler

func NewClientAPIHandler

func NewClientAPIHandler(ctx context.Context, nc nrpc.NatsConn, s ClientAPIServer) *ClientAPIHandler

func (*ClientAPIHandler) Handler

func (h *ClientAPIHandler) Handler(msg *nats.Msg)

func (*ClientAPIHandler) SetEncodings

func (h *ClientAPIHandler) SetEncodings(encodings []string)

SetEncodings sets the output encodings when using a '*Publish' function

func (*ClientAPIHandler) Subject

func (h *ClientAPIHandler) Subject() string

type ClientAPIServer

type ClientAPIServer interface {
	GetActors(ctx context.Context) (*ClientGetActorsReply, error)
	GetSessionToken(ctx context.Context, req *GetSessionTokenRequest) (*SessionToken, error)
}

ClientAPIServer is the interface that providers of the service ClientAPI should implement.

type ClientGetActorsReply

type ClientGetActorsReply struct {
	Actors []*Actor `protobuf:"bytes,1,rep,name=actors,proto3" json:"actors,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientGetActorsReply) Descriptor deprecated

func (*ClientGetActorsReply) Descriptor() ([]byte, []int)

Deprecated: Use ClientGetActorsReply.ProtoReflect.Descriptor instead.

func (*ClientGetActorsReply) GetActors

func (x *ClientGetActorsReply) GetActors() []*Actor

func (*ClientGetActorsReply) ProtoMessage

func (*ClientGetActorsReply) ProtoMessage()

func (*ClientGetActorsReply) ProtoReflect

func (x *ClientGetActorsReply) ProtoReflect() protoreflect.Message

func (*ClientGetActorsReply) Reset

func (x *ClientGetActorsReply) Reset()

func (*ClientGetActorsReply) String

func (x *ClientGetActorsReply) String() string

type ClientGetActorsRequest

type ClientGetActorsRequest struct {
	ActorID []byte `protobuf:"bytes,1,opt,name=actorID,proto3" json:"actorID,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientGetActorsRequest) Descriptor deprecated

func (*ClientGetActorsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ClientGetActorsRequest.ProtoReflect.Descriptor instead.

func (*ClientGetActorsRequest) GetActorID

func (x *ClientGetActorsRequest) GetActorID() []byte

func (*ClientGetActorsRequest) GetActorIDAsUUID

func (x *ClientGetActorsRequest) GetActorIDAsUUID() UUID

func (*ClientGetActorsRequest) ProtoMessage

func (*ClientGetActorsRequest) ProtoMessage()

func (*ClientGetActorsRequest) ProtoReflect

func (x *ClientGetActorsRequest) ProtoReflect() protoreflect.Message

func (*ClientGetActorsRequest) Reset

func (x *ClientGetActorsRequest) Reset()

func (*ClientGetActorsRequest) String

func (x *ClientGetActorsRequest) String() string

type ConfigEntry

type ConfigEntry struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

*

func (*ConfigEntry) Descriptor deprecated

func (*ConfigEntry) Descriptor() ([]byte, []int)

Deprecated: Use ConfigEntry.ProtoReflect.Descriptor instead.

func (*ConfigEntry) GetKey

func (x *ConfigEntry) GetKey() string

func (*ConfigEntry) GetValue

func (x *ConfigEntry) GetValue() string

func (*ConfigEntry) ProtoMessage

func (*ConfigEntry) ProtoMessage()

func (*ConfigEntry) ProtoReflect

func (x *ConfigEntry) ProtoReflect() protoreflect.Message

func (*ConfigEntry) Reset

func (x *ConfigEntry) Reset()

func (*ConfigEntry) String

func (x *ConfigEntry) String() string

type CoreEvent

type CoreEvent struct {
	Name             string         `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Actor            *Actor         `protobuf:"bytes,2,opt,name=actor,proto3" json:"actor,omitempty"`
	Process          *Process       `protobuf:"bytes,3,opt,name=process,proto3" json:"process,omitempty"`
	ProcessOldStatus Process_Status `protobuf:"varint,4,opt,name=processOldStatus,proto3,enum=xbus.Process_Status" json:"processOldStatus,omitempty"`
	// contains filtered or unexported fields
}

func (*CoreEvent) Descriptor deprecated

func (*CoreEvent) Descriptor() ([]byte, []int)

Deprecated: Use CoreEvent.ProtoReflect.Descriptor instead.

func (*CoreEvent) GetActor

func (x *CoreEvent) GetActor() *Actor

func (*CoreEvent) GetName

func (x *CoreEvent) GetName() string

func (*CoreEvent) GetProcess

func (x *CoreEvent) GetProcess() *Process

func (*CoreEvent) GetProcessOldStatus

func (x *CoreEvent) GetProcessOldStatus() Process_Status

func (*CoreEvent) ProtoMessage

func (*CoreEvent) ProtoMessage()

func (*CoreEvent) ProtoReflect

func (x *CoreEvent) ProtoReflect() protoreflect.Message

func (*CoreEvent) Reset

func (x *CoreEvent) Reset()

func (*CoreEvent) String

func (x *CoreEvent) String() string

type CoreEventsActorSubscription

type CoreEventsActorSubscription struct {
	*nats.Subscription
	// contains filtered or unexported fields
}

func (*CoreEventsActorSubscription) Next

func (s *CoreEventsActorSubscription) Next(timeout time.Duration) (next CoreEvent, err error)

type CoreEventsClient

type CoreEventsClient struct {
	PkgSubject string
	Subject    string
	Encoding   string
	Timeout    time.Duration
	// contains filtered or unexported fields
}

func NewCoreEventsClient

func NewCoreEventsClient(nc nrpc.NatsConn) *CoreEventsClient

func (*CoreEventsClient) ActorSubject

func (c *CoreEventsClient) ActorSubject() string

func (*CoreEventsClient) ActorSubscribe

func (c *CoreEventsClient) ActorSubscribe(

	handler func(*CoreEvent),
) (sub *nats.Subscription, err error)

func (*CoreEventsClient) ActorSubscribeChan

func (c *CoreEventsClient) ActorSubscribeChan() (<-chan *CoreEvent, *nats.Subscription, error)

func (*CoreEventsClient) ActorSubscribeSync

func (c *CoreEventsClient) ActorSubscribeSync() (sub *CoreEventsActorSubscription, err error)

func (*CoreEventsClient) EnvelopeSubject

func (c *CoreEventsClient) EnvelopeSubject() string

func (*CoreEventsClient) EnvelopeSubscribe

func (c *CoreEventsClient) EnvelopeSubscribe(

	handler func(*EnvelopeEvent),
) (sub *nats.Subscription, err error)

func (*CoreEventsClient) EnvelopeSubscribeChan

func (c *CoreEventsClient) EnvelopeSubscribeChan() (<-chan *EnvelopeEvent, *nats.Subscription, error)

func (*CoreEventsClient) EnvelopeSubscribeSync

func (c *CoreEventsClient) EnvelopeSubscribeSync() (sub *CoreEventsEnvelopeSubscription, err error)

func (*CoreEventsClient) ProcessNodeReadySubject

func (c *CoreEventsClient) ProcessNodeReadySubject() string

func (*CoreEventsClient) ProcessNodeReadySubscribe

func (c *CoreEventsClient) ProcessNodeReadySubscribe(

	handler func(*ProcessNodeReadyEvent),
) (sub *nats.Subscription, err error)

func (*CoreEventsClient) ProcessNodeReadySubscribeChan

func (c *CoreEventsClient) ProcessNodeReadySubscribeChan() (<-chan *ProcessNodeReadyEvent, *nats.Subscription, error)

func (*CoreEventsClient) ProcessNodeReadySubscribeSync

func (c *CoreEventsClient) ProcessNodeReadySubscribeSync() (sub *CoreEventsProcessNodeReadySubscription, err error)

func (*CoreEventsClient) ProcessSubject

func (c *CoreEventsClient) ProcessSubject() string

func (*CoreEventsClient) ProcessSubscribe

func (c *CoreEventsClient) ProcessSubscribe(

	handler func(*CoreEvent),
) (sub *nats.Subscription, err error)

func (*CoreEventsClient) ProcessSubscribeChan

func (c *CoreEventsClient) ProcessSubscribeChan() (<-chan *CoreEvent, *nats.Subscription, error)

func (*CoreEventsClient) ProcessSubscribeSync

func (c *CoreEventsClient) ProcessSubscribeSync() (sub *CoreEventsProcessSubscription, err error)

type CoreEventsEnvelopeSubscription

type CoreEventsEnvelopeSubscription struct {
	*nats.Subscription
	// contains filtered or unexported fields
}

func (*CoreEventsEnvelopeSubscription) Next

func (s *CoreEventsEnvelopeSubscription) Next(timeout time.Duration) (next EnvelopeEvent, err error)

type CoreEventsHandler

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

CoreEventsHandler provides a NATS subscription handler that can serve a subscription using a given CoreEventsServer implementation.

func NewCoreEventsConcurrentHandler

func NewCoreEventsConcurrentHandler(workers *nrpc.WorkerPool, nc nrpc.NatsConn, s CoreEventsServer) *CoreEventsHandler

func (*CoreEventsHandler) ActorPublish

func (h *CoreEventsHandler) ActorPublish(msg *CoreEvent) error

func (*CoreEventsHandler) EnvelopePublish

func (h *CoreEventsHandler) EnvelopePublish(msg *EnvelopeEvent) error

func (*CoreEventsHandler) ProcessNodeReadyPublish

func (h *CoreEventsHandler) ProcessNodeReadyPublish(msg *ProcessNodeReadyEvent) error

func (*CoreEventsHandler) ProcessPublish

func (h *CoreEventsHandler) ProcessPublish(msg *CoreEvent) error

func (*CoreEventsHandler) SetEncodings

func (h *CoreEventsHandler) SetEncodings(encodings []string)

SetEncodings sets the output encodings when using a '*Publish' function

func (*CoreEventsHandler) Subject

func (h *CoreEventsHandler) Subject() string

type CoreEventsProcessNodeReadySubscription

type CoreEventsProcessNodeReadySubscription struct {
	*nats.Subscription
	// contains filtered or unexported fields
}

func (*CoreEventsProcessNodeReadySubscription) Next

type CoreEventsProcessSubscription

type CoreEventsProcessSubscription struct {
	*nats.Subscription
	// contains filtered or unexported fields
}

func (*CoreEventsProcessSubscription) Next

func (s *CoreEventsProcessSubscription) Next(timeout time.Duration) (next CoreEvent, err error)

type CoreEventsServer

type CoreEventsServer interface {
}

CoreEventsServer is the interface that providers of the service CoreEvents should implement.

type DirectorClient

type DirectorClient struct {
	PkgSubject string
	Subject    string
	Encoding   string
	Timeout    time.Duration
	// contains filtered or unexported fields
}

func NewDirectorClient

func NewDirectorClient(nc nrpc.NatsConn) *DirectorClient

func (*DirectorClient) GetRunningActorRequestList

func (c *DirectorClient) GetRunningActorRequestList(
	ctx context.Context, actorID string,
	cb func(context.Context, *ActorProcessRequest),
) error

func (*DirectorClient) Log

func (c *DirectorClient) Log(actorID string, req *ActorLogRequest) error

func (*DirectorClient) ProcessingEnd

func (c *DirectorClient) ProcessingEnd(actorID string, req *ActorProcessingState) error

type DirectorHandler

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

DirectorHandler provides a NATS subscription handler that can serve a subscription using a given DirectorServer implementation.

func NewDirectorConcurrentHandler

func NewDirectorConcurrentHandler(workers *nrpc.WorkerPool, nc nrpc.NatsConn, s DirectorServer) *DirectorHandler

func NewDirectorHandler

func NewDirectorHandler(ctx context.Context, nc nrpc.NatsConn, s DirectorServer) *DirectorHandler

func (*DirectorHandler) Handler

func (h *DirectorHandler) Handler(msg *nats.Msg)

func (*DirectorHandler) SetEncodings

func (h *DirectorHandler) SetEncodings(encodings []string)

SetEncodings sets the output encodings when using a '*Publish' function

func (*DirectorHandler) Subject

func (h *DirectorHandler) Subject() string

type DirectorServer

type DirectorServer interface {
	ProcessingEnd(ctx context.Context, actorID string, req *ActorProcessingState) error
	Log(ctx context.Context, actorID string, req *ActorLogRequest) error
	GetRunningActorRequestList(ctx context.Context, actorID string, pushRep func(*ActorProcessRequest)) error
}

DirectorServer is the interface that providers of the service Director should implement.

type EmitterEnvelopeState

type EmitterEnvelopeState struct {
	ProcessID        []byte                       `protobuf:"bytes,1,opt,name=processID,proto3" json:"processID,omitempty"`
	ProcessCreatedAt *timestamppb.Timestamp       `protobuf:"bytes,6,opt,name=processCreatedAt,proto3" json:"processCreatedAt,omitempty"`
	Status           Process_Status               `protobuf:"varint,2,opt,name=status,proto3,enum=xbus.Process_Status" json:"status,omitempty"`
	Errors           []*LogMessage                `protobuf:"bytes,3,rep,name=errors,proto3" json:"errors,omitempty"`
	Response         *EnvelopeFragmentAndPosition `protobuf:"bytes,4,opt,name=response,proto3" json:"response,omitempty"`
	TriggerEnvelope  *EnvelopeFragmentAndPosition `protobuf:"bytes,5,opt,name=triggerEnvelope,proto3" json:"triggerEnvelope,omitempty"`
	// contains filtered or unexported fields
}

func (*EmitterEnvelopeState) Descriptor deprecated

func (*EmitterEnvelopeState) Descriptor() ([]byte, []int)

Deprecated: Use EmitterEnvelopeState.ProtoReflect.Descriptor instead.

func (*EmitterEnvelopeState) GetErrors

func (x *EmitterEnvelopeState) GetErrors() []*LogMessage

func (*EmitterEnvelopeState) GetProcessCreatedAt

func (x *EmitterEnvelopeState) GetProcessCreatedAt() *timestamppb.Timestamp

func (*EmitterEnvelopeState) GetProcessID

func (x *EmitterEnvelopeState) GetProcessID() []byte

func (*EmitterEnvelopeState) GetProcessIDAsUUID

func (x *EmitterEnvelopeState) GetProcessIDAsUUID() UUID

func (*EmitterEnvelopeState) GetResponse

func (*EmitterEnvelopeState) GetStatus

func (x *EmitterEnvelopeState) GetStatus() Process_Status

func (*EmitterEnvelopeState) GetTriggerEnvelope

func (x *EmitterEnvelopeState) GetTriggerEnvelope() *EnvelopeFragmentAndPosition

func (*EmitterEnvelopeState) ProtoMessage

func (*EmitterEnvelopeState) ProtoMessage()

func (*EmitterEnvelopeState) ProtoReflect

func (x *EmitterEnvelopeState) ProtoReflect() protoreflect.Message

func (*EmitterEnvelopeState) Reset

func (x *EmitterEnvelopeState) Reset()

func (*EmitterEnvelopeState) String

func (x *EmitterEnvelopeState) String() string

type EmitterEnvelopeStateList

type EmitterEnvelopeStateList struct {
	List []*EmitterEnvelopeState `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
	// contains filtered or unexported fields
}

func (*EmitterEnvelopeStateList) Descriptor deprecated

func (*EmitterEnvelopeStateList) Descriptor() ([]byte, []int)

Deprecated: Use EmitterEnvelopeStateList.ProtoReflect.Descriptor instead.

func (*EmitterEnvelopeStateList) GetList

func (*EmitterEnvelopeStateList) ProtoMessage

func (*EmitterEnvelopeStateList) ProtoMessage()

func (*EmitterEnvelopeStateList) ProtoReflect

func (x *EmitterEnvelopeStateList) ProtoReflect() protoreflect.Message

func (*EmitterEnvelopeStateList) Reset

func (x *EmitterEnvelopeStateList) Reset()

func (*EmitterEnvelopeStateList) String

func (x *EmitterEnvelopeStateList) String() string

type Envelope

type Envelope struct {
	ID       []byte   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	EventIDs [][]byte `protobuf:"bytes,3,rep,name=eventIDs,proto3" json:"eventIDs,omitempty"`
	Events   []*Event `protobuf:"bytes,4,rep,name=events,proto3" json:"events,omitempty"`
	Last     bool     `protobuf:"varint,5,opt,name=last,proto3" json:"last,omitempty"`
	// contains filtered or unexported fields
}

func (*Envelope) Descriptor deprecated

func (*Envelope) Descriptor() ([]byte, []int)

Deprecated: Use Envelope.ProtoReflect.Descriptor instead.

func (*Envelope) GetEventIDs

func (x *Envelope) GetEventIDs() [][]byte

func (*Envelope) GetEventIDsAsUUIDSlice

func (x *Envelope) GetEventIDsAsUUIDSlice() UUIDSlice

func (*Envelope) GetEvents

func (x *Envelope) GetEvents() []*Event

func (*Envelope) GetID

func (x *Envelope) GetID() []byte

func (*Envelope) GetIDAsUUID

func (x *Envelope) GetIDAsUUID() UUID

func (*Envelope) GetLast

func (x *Envelope) GetLast() bool

func (*Envelope) MarshalJSONStream

func (x *Envelope) MarshalJSONStream(stream *jsoniter.Stream)

func (*Envelope) Merge

func (envelope *Envelope) Merge(fragment ...*Envelope) error

Merge some envelope fragments into this envelope

func (*Envelope) ProtoMessage

func (*Envelope) ProtoMessage()

func (*Envelope) ProtoReflect

func (x *Envelope) ProtoReflect() protoreflect.Message

func (*Envelope) Reset

func (x *Envelope) Reset()

func (*Envelope) String

func (x *Envelope) String() string

func (*Envelope) UnmarshalJSONIter

func (x *Envelope) UnmarshalJSONIter(iter *jsoniter.Iterator)

type EnvelopeAck

type EnvelopeAck struct {
	ID     []byte                      `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Status EnvelopeAck_ReceptionStatus `protobuf:"varint,2,opt,name=status,proto3,enum=xbus.EnvelopeAck_ReceptionStatus" json:"status,omitempty"`
	Reason string                      `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"`
	// contains filtered or unexported fields
}

func NewEnvelopeAck

func NewEnvelopeAck(id UUID, status EnvelopeAck_ReceptionStatus) *EnvelopeAck

NewEnvelopeAck creates a normal EnvelopeAck

func NewEnvelopeAckError

func NewEnvelopeAckError(id UUID, err error) *EnvelopeAck

NewEnvelopeAckError prepare a EnvelopeAck from an error

func (*EnvelopeAck) Descriptor deprecated

func (*EnvelopeAck) Descriptor() ([]byte, []int)

Deprecated: Use EnvelopeAck.ProtoReflect.Descriptor instead.

func (*EnvelopeAck) GetID

func (x *EnvelopeAck) GetID() []byte

func (*EnvelopeAck) GetIDAsUUID

func (x *EnvelopeAck) GetIDAsUUID() UUID

func (*EnvelopeAck) GetReason

func (x *EnvelopeAck) GetReason() string

func (*EnvelopeAck) GetStatus

func (*EnvelopeAck) ProtoMessage

func (*EnvelopeAck) ProtoMessage()

func (*EnvelopeAck) ProtoReflect

func (x *EnvelopeAck) ProtoReflect() protoreflect.Message

func (*EnvelopeAck) Reset

func (x *EnvelopeAck) Reset()

func (*EnvelopeAck) String

func (x *EnvelopeAck) String() string

type EnvelopeAck_ReceptionStatus

type EnvelopeAck_ReceptionStatus int32
const (
	EnvelopeAck_NOSTATUS  EnvelopeAck_ReceptionStatus = 0
	EnvelopeAck_RECEIVING EnvelopeAck_ReceptionStatus = 1
	EnvelopeAck_ACCEPTED  EnvelopeAck_ReceptionStatus = 2
	EnvelopeAck_ERROR     EnvelopeAck_ReceptionStatus = 3
)

func (EnvelopeAck_ReceptionStatus) Descriptor

func (EnvelopeAck_ReceptionStatus) Enum

func (EnvelopeAck_ReceptionStatus) EnumDescriptor deprecated

func (EnvelopeAck_ReceptionStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use EnvelopeAck_ReceptionStatus.Descriptor instead.

func (EnvelopeAck_ReceptionStatus) Number

func (EnvelopeAck_ReceptionStatus) String

func (EnvelopeAck_ReceptionStatus) Type

type EnvelopeEvent

type EnvelopeEvent struct {
	EnvelopeID []byte               `protobuf:"bytes,1,opt,name=envelopeID,proto3" json:"envelopeID,omitempty"`
	Status     EnvelopeEvent_Status `protobuf:"varint,2,opt,name=status,proto3,enum=xbus.EnvelopeEvent_Status" json:"status,omitempty"`
	NewData    bool                 `protobuf:"varint,3,opt,name=newData,proto3" json:"newData,omitempty"`
	// contains filtered or unexported fields
}

func (*EnvelopeEvent) Descriptor deprecated

func (*EnvelopeEvent) Descriptor() ([]byte, []int)

Deprecated: Use EnvelopeEvent.ProtoReflect.Descriptor instead.

func (*EnvelopeEvent) GetEnvelopeID

func (x *EnvelopeEvent) GetEnvelopeID() []byte

func (*EnvelopeEvent) GetEnvelopeIDAsUUID

func (x *EnvelopeEvent) GetEnvelopeIDAsUUID() UUID

func (*EnvelopeEvent) GetNewData

func (x *EnvelopeEvent) GetNewData() bool

func (*EnvelopeEvent) GetStatus

func (x *EnvelopeEvent) GetStatus() EnvelopeEvent_Status

func (*EnvelopeEvent) ProtoMessage

func (*EnvelopeEvent) ProtoMessage()

func (*EnvelopeEvent) ProtoReflect

func (x *EnvelopeEvent) ProtoReflect() protoreflect.Message

func (*EnvelopeEvent) Reset

func (x *EnvelopeEvent) Reset()

func (*EnvelopeEvent) String

func (x *EnvelopeEvent) String() string

type EnvelopeEvent_Status

type EnvelopeEvent_Status int32
const (
	EnvelopeEvent_UNKNOWN   EnvelopeEvent_Status = 0
	EnvelopeEvent_RECEIVING EnvelopeEvent_Status = 1
	EnvelopeEvent_COMPLETE  EnvelopeEvent_Status = 3
	EnvelopeEvent_ERROR     EnvelopeEvent_Status = 4
	EnvelopeEvent_STALLED   EnvelopeEvent_Status = 5
)

func (EnvelopeEvent_Status) Descriptor

func (EnvelopeEvent_Status) Enum

func (EnvelopeEvent_Status) EnumDescriptor deprecated

func (EnvelopeEvent_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use EnvelopeEvent_Status.Descriptor instead.

func (EnvelopeEvent_Status) Number

func (EnvelopeEvent_Status) String

func (x EnvelopeEvent_Status) String() string

func (EnvelopeEvent_Status) Type

type EnvelopeFragmentAndPosition

type EnvelopeFragmentAndPosition struct {
	Fragment *Envelope         `protobuf:"bytes,1,opt,name=fragment,proto3" json:"fragment,omitempty"`
	Position *EnvelopePosition `protobuf:"bytes,2,opt,name=position,proto3" json:"position,omitempty"`
	// contains filtered or unexported fields
}

func (*EnvelopeFragmentAndPosition) Descriptor deprecated

func (*EnvelopeFragmentAndPosition) Descriptor() ([]byte, []int)

Deprecated: Use EnvelopeFragmentAndPosition.ProtoReflect.Descriptor instead.

func (*EnvelopeFragmentAndPosition) GetFragment

func (x *EnvelopeFragmentAndPosition) GetFragment() *Envelope

func (*EnvelopeFragmentAndPosition) GetPosition

func (*EnvelopeFragmentAndPosition) ProtoMessage

func (*EnvelopeFragmentAndPosition) ProtoMessage()

func (*EnvelopeFragmentAndPosition) ProtoReflect

func (*EnvelopeFragmentAndPosition) Reset

func (x *EnvelopeFragmentAndPosition) Reset()

func (*EnvelopeFragmentAndPosition) String

func (x *EnvelopeFragmentAndPosition) String() string

type EnvelopePosition

type EnvelopePosition struct {
	EnvelopeID     []byte           `protobuf:"bytes,1,opt,name=envelopeID,proto3" json:"envelopeID,omitempty"`
	Start          bool             `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"`
	Complete       bool             `protobuf:"varint,3,opt,name=complete,proto3" json:"complete,omitempty"`
	EventPositions []*EventPosition `protobuf:"bytes,4,rep,name=eventPositions,proto3" json:"eventPositions,omitempty"`
	// contains filtered or unexported fields
}

func EnvelopePositionStart

func EnvelopePositionStart(id UUID) EnvelopePosition

EnvelopePositionStart returns the start position of an envelope

func (*EnvelopePosition) Descriptor deprecated

func (*EnvelopePosition) Descriptor() ([]byte, []int)

Deprecated: Use EnvelopePosition.ProtoReflect.Descriptor instead.

func (*EnvelopePosition) GetComplete

func (x *EnvelopePosition) GetComplete() bool

func (*EnvelopePosition) GetEnvelopeID

func (x *EnvelopePosition) GetEnvelopeID() []byte

func (*EnvelopePosition) GetEnvelopeIDAsUUID

func (x *EnvelopePosition) GetEnvelopeIDAsUUID() UUID

func (*EnvelopePosition) GetEventPositions

func (x *EnvelopePosition) GetEventPositions() []*EventPosition

func (*EnvelopePosition) GetStart

func (x *EnvelopePosition) GetStart() bool

func (*EnvelopePosition) MarshalJSONStream

func (x *EnvelopePosition) MarshalJSONStream(stream *jsoniter.Stream)

func (*EnvelopePosition) ProtoMessage

func (*EnvelopePosition) ProtoMessage()

func (*EnvelopePosition) ProtoReflect

func (x *EnvelopePosition) ProtoReflect() protoreflect.Message

func (*EnvelopePosition) Reset

func (x *EnvelopePosition) Reset()

func (*EnvelopePosition) String

func (x *EnvelopePosition) String() string

func (*EnvelopePosition) UnmarshalJSONIter

func (x *EnvelopePosition) UnmarshalJSONIter(iter *jsoniter.Iterator)

type EnvelopeStorageClient

type EnvelopeStorageClient struct {
	PkgSubject string
	Subject    string
	Encoding   string
	Timeout    time.Duration
	// contains filtered or unexported fields
}

func NewEnvelopeStorageClient

func NewEnvelopeStorageClient(nc nrpc.NatsConn) *EnvelopeStorageClient

func (*EnvelopeStorageClient) Retrieve

func (c *EnvelopeStorageClient) Retrieve(
	ctx context.Context, clientKind string, clientID string,
	req *EnvelopePosition,
	cb func(context.Context, *EnvelopeFragmentAndPosition),
) error

type EnvelopeStorageHandler

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

EnvelopeStorageHandler provides a NATS subscription handler that can serve a subscription using a given EnvelopeStorageServer implementation.

func NewEnvelopeStorageConcurrentHandler

func NewEnvelopeStorageConcurrentHandler(workers *nrpc.WorkerPool, nc nrpc.NatsConn, s EnvelopeStorageServer) *EnvelopeStorageHandler

func (*EnvelopeStorageHandler) Handler

func (h *EnvelopeStorageHandler) Handler(msg *nats.Msg)

func (*EnvelopeStorageHandler) SetEncodings

func (h *EnvelopeStorageHandler) SetEncodings(encodings []string)

SetEncodings sets the output encodings when using a '*Publish' function

func (*EnvelopeStorageHandler) Subject

func (h *EnvelopeStorageHandler) Subject() string

type EnvelopeStorageServer

type EnvelopeStorageServer interface {
	Retrieve(ctx context.Context, clientKind string, clientID string, req *EnvelopePosition, pushRep func(*EnvelopeFragmentAndPosition)) error
}

EnvelopeStorageServer is the interface that providers of the service EnvelopeStorage should implement.

type EnvelopeTarget

type EnvelopeTarget struct {
	ActorID []byte `protobuf:"bytes,1,opt,name=actorID,proto3" json:"actorID,omitempty"`
	NodeID  string `protobuf:"bytes,2,opt,name=nodeID,proto3" json:"nodeID,omitempty"`
	Input   string `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"`
	// contains filtered or unexported fields
}

func (*EnvelopeTarget) Descriptor deprecated

func (*EnvelopeTarget) Descriptor() ([]byte, []int)

Deprecated: Use EnvelopeTarget.ProtoReflect.Descriptor instead.

func (*EnvelopeTarget) GetActorID

func (x *EnvelopeTarget) GetActorID() []byte

func (*EnvelopeTarget) GetActorIDAsUUID

func (x *EnvelopeTarget) GetActorIDAsUUID() UUID

func (*EnvelopeTarget) GetInput

func (x *EnvelopeTarget) GetInput() string

func (*EnvelopeTarget) GetNodeID

func (x *EnvelopeTarget) GetNodeID() string

func (*EnvelopeTarget) ProtoMessage

func (*EnvelopeTarget) ProtoMessage()

func (*EnvelopeTarget) ProtoReflect

func (x *EnvelopeTarget) ProtoReflect() protoreflect.Message

func (*EnvelopeTarget) Reset

func (x *EnvelopeTarget) Reset()

func (*EnvelopeTarget) String

func (x *EnvelopeTarget) String() string

type Event

type Event struct {
	ID        []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Type      string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Index     uint64 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
	ItemCount uint64 `protobuf:"varint,4,opt,name=itemCount,proto3" json:"itemCount,omitempty"`
	// / A Castagnoli CRC32 checksum calculated on the concatenation of:
	//
	// * the event id binary representation
	// * the event type
	// * all the items
	Checksum uint32   `protobuf:"varint,5,opt,name=checksum,proto3" json:"checksum,omitempty"`
	Items    [][]byte `protobuf:"bytes,6,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

* A message inside an envelope

.. hint::

Do not be confused by the name "Event", it really is a *message*.
The name may change in a future version of the API

func (*Event) Descriptor deprecated

func (*Event) Descriptor() ([]byte, []int)

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetChecksum

func (x *Event) GetChecksum() uint32

func (*Event) GetID

func (x *Event) GetID() []byte

func (*Event) GetIDAsUUID

func (x *Event) GetIDAsUUID() UUID

func (*Event) GetIndex

func (x *Event) GetIndex() uint64

func (*Event) GetItemCount

func (x *Event) GetItemCount() uint64

func (*Event) GetItems

func (x *Event) GetItems() [][]byte

func (*Event) GetItemsAsItemSlice

func (x *Event) GetItemsAsItemSlice() []Item

func (*Event) GetType

func (x *Event) GetType() string

func (*Event) MarshalJSONStream

func (x *Event) MarshalJSONStream(stream *jsoniter.Stream)

MarshalJSONStream encode a Event with an additional "encoding" that is the actual encoding of the items

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

func (x *Event) ProtoReflect() protoreflect.Message

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

func (*Event) UnmarshalJSONIter

func (x *Event) UnmarshalJSONIter(iter *jsoniter.Iterator)

type EventPosition

type EventPosition struct {
	EventID   []byte `protobuf:"bytes,1,opt,name=eventID,proto3" json:"eventID,omitempty"`
	Index     uint64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
	ItemCount uint64 `protobuf:"varint,3,opt,name=itemCount,proto3" json:"itemCount,omitempty"`
	// contains filtered or unexported fields
}

func (*EventPosition) Descriptor deprecated

func (*EventPosition) Descriptor() ([]byte, []int)

Deprecated: Use EventPosition.ProtoReflect.Descriptor instead.

func (*EventPosition) GetEventID

func (x *EventPosition) GetEventID() []byte

func (*EventPosition) GetEventIDAsUUID

func (x *EventPosition) GetEventIDAsUUID() UUID

func (*EventPosition) GetIndex

func (x *EventPosition) GetIndex() uint64

func (*EventPosition) GetItemCount

func (x *EventPosition) GetItemCount() uint64

func (*EventPosition) MarshalJSONStream

func (x *EventPosition) MarshalJSONStream(stream *jsoniter.Stream)

func (*EventPosition) ProtoMessage

func (*EventPosition) ProtoMessage()

func (*EventPosition) ProtoReflect

func (x *EventPosition) ProtoReflect() protoreflect.Message

func (*EventPosition) Reset

func (x *EventPosition) Reset()

func (*EventPosition) String

func (x *EventPosition) String() string

func (*EventPosition) UnmarshalJSONIter

func (x *EventPosition) UnmarshalJSONIter(iter *jsoniter.Iterator)

type FragmentsBuilder

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

func NewFragmentsBuilder

func NewFragmentsBuilder(
	id UUID, pushFragment func(*Envelope),
	optionSetters ...FragmentsBuilderOptionSetter,
) *FragmentsBuilder

func (*FragmentsBuilder) AddChunk

func (b *FragmentsBuilder) AddChunk(id UUID, chunk []byte) error

AddChunk adds a chunk to an event.

func (*FragmentsBuilder) AddMessage

func (b *FragmentsBuilder) AddMessage(id UUID, msgType string) error

AddMessage adds a message

func (*FragmentsBuilder) CloseMessage

func (b *FragmentsBuilder) CloseMessage(id UUID, checksum Checksum) error

func (*FragmentsBuilder) LastMessage

func (b *FragmentsBuilder) LastMessage()

LastMessage signals that no more message will be added

type FragmentsBuilderOptionSetter

type FragmentsBuilderOptionSetter func(*FragmentsBuilderOptions)

func FragmentsBuilderMaxSize

func FragmentsBuilderMaxSize(maxSize int) FragmentsBuilderOptionSetter

type FragmentsBuilderOptions

type FragmentsBuilderOptions struct {
	MaxSize int
}

type GetEnvelopeStateRequest

type GetEnvelopeStateRequest struct {
	ID []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetEnvelopeStateRequest) Descriptor deprecated

func (*GetEnvelopeStateRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetEnvelopeStateRequest.ProtoReflect.Descriptor instead.

func (*GetEnvelopeStateRequest) GetID

func (x *GetEnvelopeStateRequest) GetID() []byte

func (*GetEnvelopeStateRequest) GetIDAsUUID

func (x *GetEnvelopeStateRequest) GetIDAsUUID() UUID

func (*GetEnvelopeStateRequest) ProtoMessage

func (*GetEnvelopeStateRequest) ProtoMessage()

func (*GetEnvelopeStateRequest) ProtoReflect

func (x *GetEnvelopeStateRequest) ProtoReflect() protoreflect.Message

func (*GetEnvelopeStateRequest) Reset

func (x *GetEnvelopeStateRequest) Reset()

func (*GetEnvelopeStateRequest) String

func (x *GetEnvelopeStateRequest) String() string

type GetSessionTokenRequest

type GetSessionTokenRequest struct {

	// / request the token to expire in a number of seconds
	ExpiresIn uint32 `protobuf:"varint,1,opt,name=expiresIn,proto3" json:"expiresIn,omitempty"`
	// / Invalidate a previous session token
	InvalidateToken string `protobuf:"bytes,2,opt,name=invalidateToken,proto3" json:"invalidateToken,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSessionTokenRequest) Descriptor deprecated

func (*GetSessionTokenRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetSessionTokenRequest.ProtoReflect.Descriptor instead.

func (*GetSessionTokenRequest) GetExpiresIn

func (x *GetSessionTokenRequest) GetExpiresIn() uint32

func (*GetSessionTokenRequest) GetInvalidateToken

func (x *GetSessionTokenRequest) GetInvalidateToken() string

func (*GetSessionTokenRequest) ProtoMessage

func (*GetSessionTokenRequest) ProtoMessage()

func (*GetSessionTokenRequest) ProtoReflect

func (x *GetSessionTokenRequest) ProtoReflect() protoreflect.Message

func (*GetSessionTokenRequest) Reset

func (x *GetSessionTokenRequest) Reset()

func (*GetSessionTokenRequest) String

func (x *GetSessionTokenRequest) String() string

type Item

type Item []byte

Item ...

func ChunksAsItems

func ChunksAsItems(chunks [][]byte) []Item

ChunksAsItems converts a slice of chunks into a slice of items

func (Item) MarshalYAML

func (item Item) MarshalYAML() (interface{}, error)

MarshalYAML customizes YAML marshaling

type ItemEncoding

type ItemEncoding int

ItemEncoding The idem encoding in a json payload

const (
	// ItemBinary is for base64 encoded data
	ItemBinary ItemEncoding = iota
	// ItemText is for text encoded data
	ItemText
	// ItemJSON is for embedding json directly
	ItemJSON
)

func JSONIterReadItemEncoding

func JSONIterReadItemEncoding(iter *jsoniter.Iterator) ItemEncoding

func ParseItemEncodingList

func ParseItemEncodingList(s string) ([]ItemEncoding, error)

ParseItemEncodingList parses a comma separated list of item encodings Space characters are trimmed from each item

func (ItemEncoding) MarshalText

func (i ItemEncoding) MarshalText() ([]byte, error)

func (ItemEncoding) String

func (i ItemEncoding) String() string

func (*ItemEncoding) UnmarshalText

func (i *ItemEncoding) UnmarshalText(text []byte) error

type JSONMarshalContext

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

func GetJSONMarshalContext

func GetJSONMarshalContext(stream *jsoniter.Stream) *JSONMarshalContext

func (*JSONMarshalContext) AcceptEncodings

func (c *JSONMarshalContext) AcceptEncodings() []ItemEncoding

type LogEntry

type LogEntry struct {
	EnvelopeID []byte      `protobuf:"bytes,1,opt,name=envelopeID,proto3" json:"envelopeID,omitempty"`
	ActorID    []byte      `protobuf:"bytes,2,opt,name=actorID,proto3" json:"actorID,omitempty"`
	ProcessID  []byte      `protobuf:"bytes,3,opt,name=processID,proto3" json:"processID,omitempty"`
	NodeID     string      `protobuf:"bytes,4,opt,name=nodeID,proto3" json:"nodeID,omitempty"`
	Message    *LogMessage `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*LogEntry) Descriptor deprecated

func (*LogEntry) Descriptor() ([]byte, []int)

Deprecated: Use LogEntry.ProtoReflect.Descriptor instead.

func (*LogEntry) GetActorID

func (x *LogEntry) GetActorID() []byte

func (*LogEntry) GetActorIDAsUUID

func (x *LogEntry) GetActorIDAsUUID() UUID

func (*LogEntry) GetEnvelopeID

func (x *LogEntry) GetEnvelopeID() []byte

func (*LogEntry) GetEnvelopeIDAsUUID

func (x *LogEntry) GetEnvelopeIDAsUUID() UUID

func (*LogEntry) GetMessage

func (x *LogEntry) GetMessage() *LogMessage

func (*LogEntry) GetNodeID

func (x *LogEntry) GetNodeID() string

func (*LogEntry) GetProcessID

func (x *LogEntry) GetProcessID() []byte

func (*LogEntry) GetProcessIDAsUUID

func (x *LogEntry) GetProcessIDAsUUID() UUID

func (*LogEntry) MarshalJSONStream

func (x *LogEntry) MarshalJSONStream(stream *jsoniter.Stream)

func (*LogEntry) ProtoMessage

func (*LogEntry) ProtoMessage()

func (*LogEntry) ProtoReflect

func (x *LogEntry) ProtoReflect() protoreflect.Message

func (*LogEntry) Reset

func (x *LogEntry) Reset()

func (*LogEntry) String

func (x *LogEntry) String() string

type LogLevel

type LogLevel int32

* Defines the severity of a log entry

const (
	LogLevel_NOTICE  LogLevel = 0
	LogLevel_WARNING LogLevel = 1
	LogLevel_ERROR   LogLevel = 2
)

func (LogLevel) Descriptor

func (LogLevel) Descriptor() protoreflect.EnumDescriptor

func (LogLevel) Enum

func (x LogLevel) Enum() *LogLevel

func (LogLevel) EnumDescriptor deprecated

func (LogLevel) EnumDescriptor() ([]byte, []int)

Deprecated: Use LogLevel.Descriptor instead.

func (LogLevel) MarshalText

func (e LogLevel) MarshalText() ([]byte, error)

MarshalText serialize a LogLevel

func (LogLevel) Number

func (x LogLevel) Number() protoreflect.EnumNumber

func (LogLevel) String

func (x LogLevel) String() string

func (LogLevel) Type

func (*LogLevel) UnmarshalText

func (e *LogLevel) UnmarshalText(data []byte) error

UnmarshalText parses a LogLevel string

type LogMessage

type LogMessage struct {

	// timestamp of the log entry
	Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"`
	// severity level
	Level LogLevel `protobuf:"varint,2,opt,name=level,proto3,enum=xbus.LogLevel" json:"level,omitempty"`
	// entry text
	Text string `protobuf:"bytes,3,opt,name=Text,proto3" json:"Text,omitempty"`
	// contains filtered or unexported fields
}

* A logging entry

func (*LogMessage) Descriptor deprecated

func (*LogMessage) Descriptor() ([]byte, []int)

Deprecated: Use LogMessage.ProtoReflect.Descriptor instead.

func (*LogMessage) GetLevel

func (x *LogMessage) GetLevel() LogLevel

func (*LogMessage) GetText

func (x *LogMessage) GetText() string

func (*LogMessage) GetTime

func (x *LogMessage) GetTime() *timestamppb.Timestamp

func (*LogMessage) MarshalJSONStream

func (x *LogMessage) MarshalJSONStream(stream *jsoniter.Stream)

func (*LogMessage) ProtoMessage

func (*LogMessage) ProtoMessage()

func (*LogMessage) ProtoReflect

func (x *LogMessage) ProtoReflect() protoreflect.Message

func (*LogMessage) Reset

func (x *LogMessage) Reset()

func (*LogMessage) String

func (x *LogMessage) String() string

func (*LogMessage) UnmarshalJSONIter

func (x *LogMessage) UnmarshalJSONIter(iter *jsoniter.Iterator)

type OutputRequest

type OutputRequest struct {
	Context  *ProcessingContext `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"`
	Output   string             `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"`
	Close    bool               `protobuf:"varint,3,opt,name=close,proto3" json:"close,omitempty"`
	Envelope *Envelope          `protobuf:"bytes,4,opt,name=envelope,proto3" json:"envelope,omitempty"`
	// contains filtered or unexported fields
}

func (*OutputRequest) Descriptor deprecated

func (*OutputRequest) Descriptor() ([]byte, []int)

Deprecated: Use OutputRequest.ProtoReflect.Descriptor instead.

func (*OutputRequest) GetClose

func (x *OutputRequest) GetClose() bool

func (*OutputRequest) GetContext

func (x *OutputRequest) GetContext() *ProcessingContext

func (*OutputRequest) GetEnvelope

func (x *OutputRequest) GetEnvelope() *Envelope

func (*OutputRequest) GetOutput

func (x *OutputRequest) GetOutput() string

func (*OutputRequest) ProtoMessage

func (*OutputRequest) ProtoMessage()

func (*OutputRequest) ProtoReflect

func (x *OutputRequest) ProtoReflect() protoreflect.Message

func (*OutputRequest) Reset

func (x *OutputRequest) Reset()

func (*OutputRequest) String

func (x *OutputRequest) String() string

func (*OutputRequest) UnmarshalJSONIter

func (x *OutputRequest) UnmarshalJSONIter(iter *jsoniter.Iterator)

type PMProcess

type PMProcess struct {
	Process *Process         `protobuf:"bytes,1,opt,name=process,proto3" json:"process,omitempty"`
	Level   LogLevel         `protobuf:"varint,2,opt,name=level,proto3,enum=xbus.LogLevel" json:"level,omitempty"`
	Status  PMProcess_Status `protobuf:"varint,3,opt,name=status,proto3,enum=xbus.PMProcess_Status" json:"status,omitempty"`
	Comment string           `protobuf:"bytes,4,opt,name=comment,proto3" json:"comment,omitempty"`
	Logs    []*LogEntry      `protobuf:"bytes,5,rep,name=logs,proto3" json:"logs,omitempty"`
	// contains filtered or unexported fields
}

func (*PMProcess) Descriptor deprecated

func (*PMProcess) Descriptor() ([]byte, []int)

Deprecated: Use PMProcess.ProtoReflect.Descriptor instead.

func (*PMProcess) GetComment

func (x *PMProcess) GetComment() string

func (*PMProcess) GetLevel

func (x *PMProcess) GetLevel() LogLevel

func (*PMProcess) GetLogs

func (x *PMProcess) GetLogs() []*LogEntry

func (*PMProcess) GetProcess

func (x *PMProcess) GetProcess() *Process

func (*PMProcess) GetStatus

func (x *PMProcess) GetStatus() PMProcess_Status

func (*PMProcess) ProtoMessage

func (*PMProcess) ProtoMessage()

func (*PMProcess) ProtoReflect

func (x *PMProcess) ProtoReflect() protoreflect.Message

func (*PMProcess) Reset

func (x *PMProcess) Reset()

func (*PMProcess) String

func (x *PMProcess) String() string

type PMProcess_Status

type PMProcess_Status int32
const (
	PMProcess_DEFAULT PMProcess_Status = 0
	PMProcess_NEW     PMProcess_Status = 1
	PMProcess_OPENED  PMProcess_Status = 2
	PMProcess_CLOSED  PMProcess_Status = 3
)

func (PMProcess_Status) Descriptor

func (PMProcess_Status) Enum

func (PMProcess_Status) EnumDescriptor deprecated

func (PMProcess_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use PMProcess_Status.Descriptor instead.

func (PMProcess_Status) MarshalText

func (e PMProcess_Status) MarshalText() ([]byte, error)

MarshalText serialize a PMProcess_Status

func (PMProcess_Status) Number

func (PMProcess_Status) String

func (x PMProcess_Status) String() string

func (PMProcess_Status) Type

func (*PMProcess_Status) UnmarshalText

func (e *PMProcess_Status) UnmarshalText(data []byte) error

UnmarshalText parses a PMProcess_Status string

type PipelineInfo

type PipelineInfo struct {
	ID      []byte              `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name    string              `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Version string              `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	Status  PipelineInfo_Status `protobuf:"varint,4,opt,name=status,proto3,enum=xbus.PipelineInfo_Status" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*PipelineInfo) Descriptor deprecated

func (*PipelineInfo) Descriptor() ([]byte, []int)

Deprecated: Use PipelineInfo.ProtoReflect.Descriptor instead.

func (*PipelineInfo) GetID

func (x *PipelineInfo) GetID() []byte

func (*PipelineInfo) GetIDAsUUID

func (x *PipelineInfo) GetIDAsUUID() UUID

func (*PipelineInfo) GetName

func (x *PipelineInfo) GetName() string

func (*PipelineInfo) GetStatus

func (x *PipelineInfo) GetStatus() PipelineInfo_Status

func (*PipelineInfo) GetVersion

func (x *PipelineInfo) GetVersion() string

func (*PipelineInfo) ProtoMessage

func (*PipelineInfo) ProtoMessage()

func (*PipelineInfo) ProtoReflect

func (x *PipelineInfo) ProtoReflect() protoreflect.Message

func (*PipelineInfo) Reset

func (x *PipelineInfo) Reset()

func (*PipelineInfo) String

func (x *PipelineInfo) String() string

type PipelineInfo_Status

type PipelineInfo_Status int32
const (
	PipelineInfo_DRAFT    PipelineInfo_Status = 0
	PipelineInfo_ACTIVE   PipelineInfo_Status = 1
	PipelineInfo_INACTIVE PipelineInfo_Status = 2
)

func (PipelineInfo_Status) Descriptor

func (PipelineInfo_Status) Enum

func (PipelineInfo_Status) EnumDescriptor deprecated

func (PipelineInfo_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use PipelineInfo_Status.Descriptor instead.

func (PipelineInfo_Status) MarshalText

func (e PipelineInfo_Status) MarshalText() ([]byte, error)

MarshalText serialize a PipelineInfo_Status

func (PipelineInfo_Status) Number

func (PipelineInfo_Status) String

func (x PipelineInfo_Status) String() string

func (PipelineInfo_Status) Type

func (*PipelineInfo_Status) UnmarshalText

func (e *PipelineInfo_Status) UnmarshalText(data []byte) error

UnmarshalText parses a PipelineInfo_Status string

type Process

type Process struct {
	ID                []byte                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	GroupID           []byte                 `protobuf:"bytes,8,opt,name=groupID,proto3" json:"groupID,omitempty"`
	ReplayOf          []byte                 `protobuf:"bytes,9,opt,name=replayOf,proto3" json:"replayOf,omitempty"`
	TriggerEmitterID  []byte                 `protobuf:"bytes,2,opt,name=triggerEmitterID,proto3" json:"triggerEmitterID,omitempty"`
	TriggerEnvelopeID []byte                 `protobuf:"bytes,3,opt,name=triggerEnvelopeID,proto3" json:"triggerEnvelopeID,omitempty"`
	PipelineID        []byte                 `protobuf:"bytes,4,opt,name=pipelineID,proto3" json:"pipelineID,omitempty"`
	Status            Process_Status         `protobuf:"varint,5,opt,name=status,proto3,enum=xbus.Process_Status" json:"status,omitempty"`
	State             string                 `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"`
	CreatedAt         *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
	// contains filtered or unexported fields
}

func (*Process) Descriptor deprecated

func (*Process) Descriptor() ([]byte, []int)

Deprecated: Use Process.ProtoReflect.Descriptor instead.

func (*Process) GetCreatedAt

func (x *Process) GetCreatedAt() *timestamppb.Timestamp

func (*Process) GetGroupID

func (x *Process) GetGroupID() []byte

func (*Process) GetGroupIDAsUUID

func (x *Process) GetGroupIDAsUUID() UUID

func (*Process) GetID

func (x *Process) GetID() []byte

func (*Process) GetIDAsUUID

func (x *Process) GetIDAsUUID() UUID

func (*Process) GetPipelineID

func (x *Process) GetPipelineID() []byte

func (*Process) GetPipelineIDAsUUID

func (x *Process) GetPipelineIDAsUUID() UUID

func (*Process) GetReplayOf

func (x *Process) GetReplayOf() []byte

func (*Process) GetReplayOfAsUUID

func (x *Process) GetReplayOfAsUUID() UUID

func (*Process) GetState

func (x *Process) GetState() string

func (*Process) GetStatus

func (x *Process) GetStatus() Process_Status

func (*Process) GetTriggerEmitterID

func (x *Process) GetTriggerEmitterID() []byte

func (*Process) GetTriggerEmitterIDAsUUID

func (x *Process) GetTriggerEmitterIDAsUUID() UUID

func (*Process) GetTriggerEnvelopeID

func (x *Process) GetTriggerEnvelopeID() []byte

func (*Process) GetTriggerEnvelopeIDAsUUID

func (x *Process) GetTriggerEnvelopeIDAsUUID() UUID

func (*Process) ProtoMessage

func (*Process) ProtoMessage()

func (*Process) ProtoReflect

func (x *Process) ProtoReflect() protoreflect.Message

func (*Process) Reset

func (x *Process) Reset()

func (*Process) String

func (x *Process) String() string

type ProcessFilter

type ProcessFilter struct {
	ID                [][]byte `protobuf:"bytes,1,rep,name=id,proto3" json:"id,omitempty"`
	GroupID           [][]byte `protobuf:"bytes,12,rep,name=groupID,proto3" json:"groupID,omitempty"`
	ReplayOf          [][]byte `protobuf:"bytes,13,rep,name=replayOf,proto3" json:"replayOf,omitempty"`
	TriggerEmitterID  [][]byte `protobuf:"bytes,2,rep,name=triggerEmitterID,proto3" json:"triggerEmitterID,omitempty"`
	TriggerEnvelopeID [][]byte `protobuf:"bytes,3,rep,name=triggerEnvelopeID,proto3" json:"triggerEnvelopeID,omitempty"`
	// / The time range in which the process was created
	CreatedAt  *TimeRange       `protobuf:"bytes,10,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
	PipelineID [][]byte         `protobuf:"bytes,4,rep,name=pipelineID,proto3" json:"pipelineID,omitempty"`
	EnvelopeID [][]byte         `protobuf:"bytes,5,rep,name=envelopeID,proto3" json:"envelopeID,omitempty"`
	Status     []Process_Status `protobuf:"varint,6,rep,packed,name=status,proto3,enum=xbus.Process_Status" json:"status,omitempty"`
	// / Deprecated, should be set only if compatibility with xbus 3.0 is needed
	StatusChangedFrom *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=statusChangedFrom,proto3" json:"statusChangedFrom,omitempty"`
	// / Deprecated, should be set only if compatibility with xbus 3.0 is needed
	StatusChangedTo *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=statusChangedTo,proto3" json:"statusChangedTo,omitempty"`
	// / The time range in which the process changed its status for the last time
	StatusChanged *TimeRange `protobuf:"bytes,11,opt,name=statusChanged,proto3" json:"statusChanged,omitempty"`
	ResultAcked   []bool     `protobuf:"varint,9,rep,packed,name=resultAcked,proto3" json:"resultAcked,omitempty"`
	// contains filtered or unexported fields
}

func (*ProcessFilter) Descriptor deprecated

func (*ProcessFilter) Descriptor() ([]byte, []int)

Deprecated: Use ProcessFilter.ProtoReflect.Descriptor instead.

func (*ProcessFilter) GetCreatedAt

func (x *ProcessFilter) GetCreatedAt() *TimeRange

func (*ProcessFilter) GetEnvelopeID

func (x *ProcessFilter) GetEnvelopeID() [][]byte

func (*ProcessFilter) GetEnvelopeIDAsUUIDSlice

func (x *ProcessFilter) GetEnvelopeIDAsUUIDSlice() UUIDSlice

func (*ProcessFilter) GetGroupID

func (x *ProcessFilter) GetGroupID() [][]byte

func (*ProcessFilter) GetGroupIDAsUUIDSlice

func (x *ProcessFilter) GetGroupIDAsUUIDSlice() UUIDSlice

func (*ProcessFilter) GetID

func (x *ProcessFilter) GetID() [][]byte

func (*ProcessFilter) GetIDAsUUIDSlice

func (x *ProcessFilter) GetIDAsUUIDSlice() UUIDSlice

func (*ProcessFilter) GetPipelineID

func (x *ProcessFilter) GetPipelineID() [][]byte

func (*ProcessFilter) GetPipelineIDAsUUIDSlice

func (x *ProcessFilter) GetPipelineIDAsUUIDSlice() UUIDSlice

func (*ProcessFilter) GetReplayOf

func (x *ProcessFilter) GetReplayOf() [][]byte

func (*ProcessFilter) GetReplayOfAsUUIDSlice

func (x *ProcessFilter) GetReplayOfAsUUIDSlice() UUIDSlice

func (*ProcessFilter) GetResultAcked

func (x *ProcessFilter) GetResultAcked() []bool

func (*ProcessFilter) GetStatus

func (x *ProcessFilter) GetStatus() []Process_Status

func (*ProcessFilter) GetStatusChanged

func (x *ProcessFilter) GetStatusChanged() *TimeRange

func (*ProcessFilter) GetStatusChangedFrom

func (x *ProcessFilter) GetStatusChangedFrom() *timestamppb.Timestamp

func (*ProcessFilter) GetStatusChangedTo

func (x *ProcessFilter) GetStatusChangedTo() *timestamppb.Timestamp

func (*ProcessFilter) GetTriggerEmitterID

func (x *ProcessFilter) GetTriggerEmitterID() [][]byte

func (*ProcessFilter) GetTriggerEmitterIDAsUUIDSlice

func (x *ProcessFilter) GetTriggerEmitterIDAsUUIDSlice() UUIDSlice

func (*ProcessFilter) GetTriggerEnvelopeID

func (x *ProcessFilter) GetTriggerEnvelopeID() [][]byte

func (*ProcessFilter) GetTriggerEnvelopeIDAsUUIDSlice

func (x *ProcessFilter) GetTriggerEnvelopeIDAsUUIDSlice() UUIDSlice

func (*ProcessFilter) ProtoMessage

func (*ProcessFilter) ProtoMessage()

func (*ProcessFilter) ProtoReflect

func (x *ProcessFilter) ProtoReflect() protoreflect.Message

func (*ProcessFilter) Reset

func (x *ProcessFilter) Reset()

func (*ProcessFilter) String

func (x *ProcessFilter) String() string

type ProcessNodeReadyEvent

type ProcessNodeReadyEvent struct {
	ProcessID []byte `protobuf:"bytes,1,opt,name=processID,proto3" json:"processID,omitempty"`
	ActorID   []byte `protobuf:"bytes,2,opt,name=actorID,proto3" json:"actorID,omitempty"`
	NodeID    string `protobuf:"bytes,3,opt,name=nodeID,proto3" json:"nodeID,omitempty"`
	// contains filtered or unexported fields
}

func (*ProcessNodeReadyEvent) Descriptor deprecated

func (*ProcessNodeReadyEvent) Descriptor() ([]byte, []int)

Deprecated: Use ProcessNodeReadyEvent.ProtoReflect.Descriptor instead.

func (*ProcessNodeReadyEvent) GetActorID

func (x *ProcessNodeReadyEvent) GetActorID() []byte

func (*ProcessNodeReadyEvent) GetActorIDAsUUID

func (x *ProcessNodeReadyEvent) GetActorIDAsUUID() UUID

func (*ProcessNodeReadyEvent) GetNodeID

func (x *ProcessNodeReadyEvent) GetNodeID() string

func (*ProcessNodeReadyEvent) GetProcessID

func (x *ProcessNodeReadyEvent) GetProcessID() []byte

func (*ProcessNodeReadyEvent) GetProcessIDAsUUID

func (x *ProcessNodeReadyEvent) GetProcessIDAsUUID() UUID

func (*ProcessNodeReadyEvent) ProtoMessage

func (*ProcessNodeReadyEvent) ProtoMessage()

func (*ProcessNodeReadyEvent) ProtoReflect

func (x *ProcessNodeReadyEvent) ProtoReflect() protoreflect.Message

func (*ProcessNodeReadyEvent) Reset

func (x *ProcessNodeReadyEvent) Reset()

func (*ProcessNodeReadyEvent) String

func (x *ProcessNodeReadyEvent) String() string

type ProcessStateClient

type ProcessStateClient struct {
	PkgSubject string
	Subject    string
	Encoding   string
	Timeout    time.Duration
	// contains filtered or unexported fields
}

func NewProcessStateClient

func NewProcessStateClient(nc nrpc.NatsConn) *ProcessStateClient

func (*ProcessStateClient) AckResult

func (c *ProcessStateClient) AckResult(emitterID string, req *AckResultRequest) error

func (*ProcessStateClient) EnvelopeStatesSubject

func (c *ProcessStateClient) EnvelopeStatesSubject(
	mtemitterID string, mtenvelopeID string,
) string

func (*ProcessStateClient) EnvelopeStatesSubscribe

func (c *ProcessStateClient) EnvelopeStatesSubscribe(
	mtemitterID string, mtenvelopeID string,
	handler func(*EmitterEnvelopeState),
) (sub *nats.Subscription, err error)

func (*ProcessStateClient) EnvelopeStatesSubscribeChan

func (c *ProcessStateClient) EnvelopeStatesSubscribeChan(
	mtemitterID string, mtenvelopeID string,
) (<-chan *EmitterEnvelopeState, *nats.Subscription, error)

func (*ProcessStateClient) EnvelopeStatesSubscribeSync

func (c *ProcessStateClient) EnvelopeStatesSubscribeSync(
	mtemitterID string, mtenvelopeID string,
) (sub *ProcessStateEnvelopeStatesSubscription, err error)

func (*ProcessStateClient) GetEnvelopeState

func (c *ProcessStateClient) GetEnvelopeState(emitterID string, req *GetEnvelopeStateRequest) (*EmitterEnvelopeState, error)

func (*ProcessStateClient) List

type ProcessStateEnvelopeStatesSubscription

type ProcessStateEnvelopeStatesSubscription struct {
	*nats.Subscription
	// contains filtered or unexported fields
}

func (*ProcessStateEnvelopeStatesSubscription) Next

type ProcessStateHandler

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

ProcessStateHandler provides a NATS subscription handler that can serve a subscription using a given ProcessStateServer implementation.

func NewProcessStateConcurrentHandler

func NewProcessStateConcurrentHandler(workers *nrpc.WorkerPool, nc nrpc.NatsConn, s ProcessStateServer) *ProcessStateHandler

func (*ProcessStateHandler) EnvelopeStatesPublish

func (h *ProcessStateHandler) EnvelopeStatesPublish(mtemitterID string, mtenvelopeID string, msg *EmitterEnvelopeState) error

func (*ProcessStateHandler) Handler

func (h *ProcessStateHandler) Handler(msg *nats.Msg)

func (*ProcessStateHandler) SetEncodings

func (h *ProcessStateHandler) SetEncodings(encodings []string)

SetEncodings sets the output encodings when using a '*Publish' function

func (*ProcessStateHandler) Subject

func (h *ProcessStateHandler) Subject() string

type ProcessStateServer

type ProcessStateServer interface {
	GetEnvelopeState(ctx context.Context, emitterID string, req *GetEnvelopeStateRequest) (*EmitterEnvelopeState, error)
	AckResult(ctx context.Context, emitterID string, req *AckResultRequest) error
	List(ctx context.Context, emitterID string, req *ProcessFilter, pushRep func(*EmitterEnvelopeStateList)) error
}

ProcessStateServer is the interface that providers of the service ProcessState should implement.

type Process_Status

type Process_Status int32
const (
	Process_NOSTATUS Process_Status = 0
	Process_INITIAL  Process_Status = 1
	Process_RUNNING  Process_Status = 2
	Process_PAUSED   Process_Status = 3
	Process_DONE     Process_Status = 4
	Process_ERROR    Process_Status = 5
)

func (Process_Status) Descriptor

func (Process_Status) Enum

func (x Process_Status) Enum() *Process_Status

func (Process_Status) EnumDescriptor deprecated

func (Process_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Process_Status.Descriptor instead.

func (Process_Status) MarshalText

func (e Process_Status) MarshalText() ([]byte, error)

MarshalText serialize a Process_Status

func (Process_Status) Number

func (Process_Status) String

func (x Process_Status) String() string

func (Process_Status) Type

func (*Process_Status) UnmarshalText

func (e *Process_Status) UnmarshalText(data []byte) error

UnmarshalText parses a Process_Status string

type ProcessingContext

type ProcessingContext struct {
	ProcessID []byte `protobuf:"bytes,1,opt,name=processID,proto3" json:"processID,omitempty"`
	NodeID    string `protobuf:"bytes,2,opt,name=nodeID,proto3" json:"nodeID,omitempty"`
	// contains filtered or unexported fields
}

func (*ProcessingContext) Descriptor deprecated

func (*ProcessingContext) Descriptor() ([]byte, []int)

Deprecated: Use ProcessingContext.ProtoReflect.Descriptor instead.

func (*ProcessingContext) GetNodeID

func (x *ProcessingContext) GetNodeID() string

func (*ProcessingContext) GetProcessID

func (x *ProcessingContext) GetProcessID() []byte

func (*ProcessingContext) GetProcessIDAsUUID

func (x *ProcessingContext) GetProcessIDAsUUID() UUID

func (*ProcessingContext) MarshalJSONStream

func (x *ProcessingContext) MarshalJSONStream(stream *jsoniter.Stream)

func (*ProcessingContext) MarshalZerologObject

func (x *ProcessingContext) MarshalZerologObject(e *zerolog.Event)

func (*ProcessingContext) ProtoMessage

func (*ProcessingContext) ProtoMessage()

func (*ProcessingContext) ProtoReflect

func (x *ProcessingContext) ProtoReflect() protoreflect.Message

func (*ProcessingContext) Reset

func (x *ProcessingContext) Reset()

func (*ProcessingContext) String

func (x *ProcessingContext) String() string

func (*ProcessingContext) UnmarshalJSONIter

func (x *ProcessingContext) UnmarshalJSONIter(iter *jsoniter.Iterator)

type Registration

type Registration struct {
	ID                 []byte              `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	RegistrationStatus Registration_Status `protobuf:"varint,2,opt,name=registrationStatus,proto3,enum=xbus.Registration_Status" json:"registrationStatus,omitempty"`
	SignedCertificate  string              `protobuf:"bytes,3,opt,name=signedCertificate,proto3" json:"signedCertificate,omitempty"`
	ServerCA           string              `protobuf:"bytes,4,opt,name=serverCA,proto3" json:"serverCA,omitempty"`
	ActorList          []*Actor            `protobuf:"bytes,5,rep,name=actorList,proto3" json:"actorList,omitempty"`
	// contains filtered or unexported fields
}

func (*Registration) Descriptor deprecated

func (*Registration) Descriptor() ([]byte, []int)

Deprecated: Use Registration.ProtoReflect.Descriptor instead.

func (*Registration) GetActorList

func (x *Registration) GetActorList() []*Actor

func (*Registration) GetID

func (x *Registration) GetID() []byte

func (*Registration) GetIDAsUUID

func (x *Registration) GetIDAsUUID() UUID

func (*Registration) GetRegistrationStatus

func (x *Registration) GetRegistrationStatus() Registration_Status

func (*Registration) GetServerCA

func (x *Registration) GetServerCA() string

func (*Registration) GetSignedCertificate

func (x *Registration) GetSignedCertificate() string

func (*Registration) ProtoMessage

func (*Registration) ProtoMessage()

func (*Registration) ProtoReflect

func (x *Registration) ProtoReflect() protoreflect.Message

func (*Registration) Reset

func (x *Registration) Reset()

func (*Registration) String

func (x *Registration) String() string

type RegistrationRequest

type RegistrationRequest struct {
	Name      string       `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Type      Account_Type `protobuf:"varint,2,opt,name=type,proto3,enum=xbus.Account_Type" json:"type,omitempty"`
	CSR       string       `protobuf:"bytes,3,opt,name=csr,proto3" json:"csr,omitempty"`
	ActorList []*Actor     `protobuf:"bytes,4,rep,name=actorList,proto3" json:"actorList,omitempty"`
	// contains filtered or unexported fields
}

func (*RegistrationRequest) Descriptor deprecated

func (*RegistrationRequest) Descriptor() ([]byte, []int)

Deprecated: Use RegistrationRequest.ProtoReflect.Descriptor instead.

func (*RegistrationRequest) GetActorList

func (x *RegistrationRequest) GetActorList() []*Actor

func (*RegistrationRequest) GetCSR

func (x *RegistrationRequest) GetCSR() string

func (*RegistrationRequest) GetName

func (x *RegistrationRequest) GetName() string

func (*RegistrationRequest) GetType

func (x *RegistrationRequest) GetType() Account_Type

func (*RegistrationRequest) ProtoMessage

func (*RegistrationRequest) ProtoMessage()

func (*RegistrationRequest) ProtoReflect

func (x *RegistrationRequest) ProtoReflect() protoreflect.Message

func (*RegistrationRequest) Reset

func (x *RegistrationRequest) Reset()

func (*RegistrationRequest) String

func (x *RegistrationRequest) String() string

type Registration_Status

type Registration_Status int32
const (
	Registration_PENDING  Registration_Status = 0
	Registration_ACCEPTED Registration_Status = 1
	Registration_REJECTED Registration_Status = 2
)

func (Registration_Status) Descriptor

func (Registration_Status) Enum

func (Registration_Status) EnumDescriptor deprecated

func (Registration_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Registration_Status.Descriptor instead.

func (Registration_Status) Number

func (Registration_Status) String

func (x Registration_Status) String() string

func (Registration_Status) Type

type SentinelClient

type SentinelClient struct {
	PkgSubject string
	Subject    string
	Encoding   string
	Timeout    time.Duration
	// contains filtered or unexported fields
}

func NewSentinelClient

func NewSentinelClient(nc nrpc.NatsConn) *SentinelClient

func (*SentinelClient) ActorLeaving

func (c *SentinelClient) ActorLeaving(actorID string) error

func (*SentinelClient) ActorReady

func (c *SentinelClient) ActorReady(actorID string) error

func (*SentinelClient) ListActors

func (c *SentinelClient) ListActors(
	ctx context.Context,
	cb func(context.Context, *ClientGetActorsReply),
) error

func (*SentinelClient) SurveySubject

func (c *SentinelClient) SurveySubject() string

func (*SentinelClient) SurveySubscribe

func (c *SentinelClient) SurveySubscribe(

	handler func(*SurveyRequest),
) (sub *nats.Subscription, err error)

func (*SentinelClient) SurveySubscribeChan

func (c *SentinelClient) SurveySubscribeChan() (<-chan *SurveyRequest, *nats.Subscription, error)

func (*SentinelClient) SurveySubscribeSync

func (c *SentinelClient) SurveySubscribeSync() (sub *SentinelSurveySubscription, err error)

type SentinelHandler

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

SentinelHandler provides a NATS subscription handler that can serve a subscription using a given SentinelServer implementation.

func NewSentinelConcurrentHandler

func NewSentinelConcurrentHandler(workers *nrpc.WorkerPool, nc nrpc.NatsConn, s SentinelServer) *SentinelHandler

func NewSentinelHandler

func NewSentinelHandler(ctx context.Context, nc nrpc.NatsConn, s SentinelServer) *SentinelHandler

func (*SentinelHandler) Handler

func (h *SentinelHandler) Handler(msg *nats.Msg)

func (*SentinelHandler) SetEncodings

func (h *SentinelHandler) SetEncodings(encodings []string)

SetEncodings sets the output encodings when using a '*Publish' function

func (*SentinelHandler) Subject

func (h *SentinelHandler) Subject() string

func (*SentinelHandler) SurveyPublish

func (h *SentinelHandler) SurveyPublish(msg *SurveyRequest) error

type SentinelServer

type SentinelServer interface {
	ActorReady(ctx context.Context, actorID string)
	ActorLeaving(ctx context.Context, actorID string)
	ListActors(ctx context.Context, pushRep func(*ClientGetActorsReply)) error
}

SentinelServer is the interface that providers of the service Sentinel should implement.

type SentinelSurveySubscription

type SentinelSurveySubscription struct {
	*nats.Subscription
	// contains filtered or unexported fields
}

func (*SentinelSurveySubscription) Next

func (s *SentinelSurveySubscription) Next(timeout time.Duration) (next SurveyRequest, err error)

type SessionToken

type SessionToken struct {
	Token      string                 `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	ValidUntil *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=validUntil,proto3" json:"validUntil,omitempty"`
	// contains filtered or unexported fields
}

func (*SessionToken) Descriptor deprecated

func (*SessionToken) Descriptor() ([]byte, []int)

Deprecated: Use SessionToken.ProtoReflect.Descriptor instead.

func (*SessionToken) GetToken

func (x *SessionToken) GetToken() string

func (*SessionToken) GetValidUntil

func (x *SessionToken) GetValidUntil() *timestamppb.Timestamp

func (*SessionToken) ProtoMessage

func (*SessionToken) ProtoMessage()

func (*SessionToken) ProtoReflect

func (x *SessionToken) ProtoReflect() protoreflect.Message

func (*SessionToken) Reset

func (x *SessionToken) Reset()

func (*SessionToken) String

func (x *SessionToken) String() string

type StringReply

type StringReply struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*StringReply) Descriptor deprecated

func (*StringReply) Descriptor() ([]byte, []int)

Deprecated: Use StringReply.ProtoReflect.Descriptor instead.

func (*StringReply) GetValue

func (x *StringReply) GetValue() string

func (*StringReply) ProtoMessage

func (*StringReply) ProtoMessage()

func (*StringReply) ProtoReflect

func (x *StringReply) ProtoReflect() protoreflect.Message

func (*StringReply) Reset

func (x *StringReply) Reset()

func (*StringReply) String

func (x *StringReply) String() string

type SurveyRequest

type SurveyRequest struct {
	OnlineStatus bool `protobuf:"varint,1,opt,name=onlineStatus,proto3" json:"onlineStatus,omitempty"`
	// contains filtered or unexported fields
}

func (*SurveyRequest) Descriptor deprecated

func (*SurveyRequest) Descriptor() ([]byte, []int)

Deprecated: Use SurveyRequest.ProtoReflect.Descriptor instead.

func (*SurveyRequest) GetOnlineStatus

func (x *SurveyRequest) GetOnlineStatus() bool

func (*SurveyRequest) ProtoMessage

func (*SurveyRequest) ProtoMessage()

func (*SurveyRequest) ProtoReflect

func (x *SurveyRequest) ProtoReflect() protoreflect.Message

func (*SurveyRequest) Reset

func (x *SurveyRequest) Reset()

func (*SurveyRequest) String

func (x *SurveyRequest) String() string

type SvcRegistrationClient

type SvcRegistrationClient struct {
	PkgSubject string
	Subject    string
	Encoding   string
	Timeout    time.Duration
	// contains filtered or unexported fields
}

func NewSvcRegistrationClient

func NewSvcRegistrationClient(nc nrpc.NatsConn) *SvcRegistrationClient

func (*SvcRegistrationClient) Register

func (*SvcRegistrationClient) Update

func (c *SvcRegistrationClient) Update(accountID string, req *RegistrationRequest) (*Registration, error)

type SvcRegistrationHandler

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

SvcRegistrationHandler provides a NATS subscription handler that can serve a subscription using a given SvcRegistrationServer implementation.

func NewSvcRegistrationConcurrentHandler

func NewSvcRegistrationConcurrentHandler(workers *nrpc.WorkerPool, nc nrpc.NatsConn, s SvcRegistrationServer) *SvcRegistrationHandler

func (*SvcRegistrationHandler) Handler

func (h *SvcRegistrationHandler) Handler(msg *nats.Msg)

func (*SvcRegistrationHandler) SetEncodings

func (h *SvcRegistrationHandler) SetEncodings(encodings []string)

SetEncodings sets the output encodings when using a '*Publish' function

func (*SvcRegistrationHandler) Subject

func (h *SvcRegistrationHandler) Subject() string

type SvcRegistrationServer

type SvcRegistrationServer interface {
	Register(ctx context.Context, req *RegistrationRequest) (*Registration, error)
	Update(ctx context.Context, accountID string, req *RegistrationRequest) (*Registration, error)
}

SvcRegistrationServer is the interface that providers of the service SvcRegistration should implement.

type SyncFragmentsBuilder

type SyncFragmentsBuilder struct {
	*FragmentsBuilder
	// contains filtered or unexported fields
}

func NewSyncFragmentsBuilder

func NewSyncFragmentsBuilder(id UUID, pushFragment func(*Envelope), setters ...FragmentsBuilderOptionSetter) *SyncFragmentsBuilder

func (*SyncFragmentsBuilder) AddChunk

func (b *SyncFragmentsBuilder) AddChunk(id UUID, chunk []byte) error

AddChunk adds a chunk to an event.

func (*SyncFragmentsBuilder) AddMessage

func (b *SyncFragmentsBuilder) AddMessage(id UUID, msgType string) error

AddMessage adds a message

func (*SyncFragmentsBuilder) CloseMessage

func (b *SyncFragmentsBuilder) CloseMessage(id UUID, checksum Checksum) error

func (*SyncFragmentsBuilder) LastMessage

func (b *SyncFragmentsBuilder) LastMessage()

LastMessage signals that no more message will be added

type TimeRange

type TimeRange struct {
	From *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	To   *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
	// contains filtered or unexported fields
}

func (*TimeRange) Descriptor deprecated

func (*TimeRange) Descriptor() ([]byte, []int)

Deprecated: Use TimeRange.ProtoReflect.Descriptor instead.

func (*TimeRange) GetFrom

func (x *TimeRange) GetFrom() *timestamppb.Timestamp

func (*TimeRange) GetTo

func (x *TimeRange) GetTo() *timestamppb.Timestamp

func (*TimeRange) IsZero

func (m *TimeRange) IsZero() bool

IsZero returns true if the TimeRange is unset (ie is nil or has both To and From undefined

func (*TimeRange) ProtoMessage

func (*TimeRange) ProtoMessage()

func (*TimeRange) ProtoReflect

func (x *TimeRange) ProtoReflect() protoreflect.Message

func (*TimeRange) Reset

func (x *TimeRange) Reset()

func (*TimeRange) String

func (x *TimeRange) String() string

type UUID

type UUID muuid.UUID

UUID is thin wrapper of m4rw3r/uuid.UUID

func JSONIterReadUUID

func JSONIterReadUUID(iter *jsoniter.Iterator) UUID

func MaybeUUIDFromString

func MaybeUUIDFromString(s string) UUID

MaybeUUIDFromString reads a UUID into a new UUID instance, setting the instance to zero if it fails.

func MustUUIDFromBytes

func MustUUIDFromBytes(data []byte) UUID

func MustUUIDFromString

func MustUUIDFromString(s string) UUID

MustUUIDFromString parses and returns a UUID, and panics if it fails to do so

func NewPopulatedUUID

func NewPopulatedUUID(r randyUUID) *UUID

NewPopulatedUUID implements V4 with a randy source

func UUIDFromBytes

func UUIDFromBytes(data []byte) (UUID, error)

func UUIDFromString

func UUIDFromString(s string) (UUID, error)

UUIDFromString parses and returns a UUID

func UUIDV4

func UUIDV4() (UUID, error)

UUIDV4 creates a UUID from rand

func (UUID) Compare

func (uuid UUID) Compare(other UUID) int

Compare compares two value

func (UUID) Equal

func (uuid UUID) Equal(other UUID) bool

Equal returns true if the two values are equal.

func (UUID) IsZero

func (uuid UUID) IsZero() bool

IsZero returns true if the uuid has only zeros

func (UUID) Marshal

func (uuid UUID) Marshal() ([]byte, error)

Marshal returns the bytes representation for protobuf encoding

func (UUID) MarshalJSON

func (uuid UUID) MarshalJSON() ([]byte, error)

MarshalJSON returns the string-representation of the UUID as a JSON-string.

func (UUID) MarshalText

func (uuid UUID) MarshalText() ([]byte, error)

MarshalText returns the string-representation of the UUID as a byte-array.

func (UUID) MarshalTo

func (uuid UUID) MarshalTo(data []byte) (n int, err error)

MarshalTo write the bytes representation for protobuf encoding to a buffer

func (*UUID) ReadBytes

func (uuid *UUID) ReadBytes(str []byte) error

ReadBytes reads the supplied byte array of hexadecimal characters representing a UUID into the instance.

func (*UUID) SetString

func (uuid *UUID) SetString(str string) error

SetString sets the uuid value from a string

func (*UUID) SetZero

func (uuid *UUID) SetZero()

SetZero reset the uuid to zeros

func (*UUID) Size

func (uuid *UUID) Size() int

Size returns the size needed for a protobuf encoding

func (UUID) String

func (uuid UUID) String() string

String returns a string (hex) representation of the uuid

func (UUID) ToBytes

func (uuid UUID) ToBytes() []byte

ToBytes casts the uuid to a slice of bytes suitable for protobuf transport

func (*UUID) Unmarshal

func (uuid *UUID) Unmarshal(data []byte) error

Unmarshal loads a value from a protobuf encoding

func (*UUID) UnmarshalJSON

func (uuid *UUID) UnmarshalJSON(data []byte) error

UnmarshalJSON reads an UUID from a JSON-string into the UUID instance. If this fails the state of the UUID is undetermined.

func (*UUID) UnmarshalText

func (uuid *UUID) UnmarshalText(data []byte) error

UnmarshalText reads an UUID from a string into the UUID instance. If this fails the state of the UUID is undetermined.

type UUIDSlice

type UUIDSlice []UUID

UUIDSlice attaches the methods of sort.Interface to []UUID, sorting in increasing order.

func MustUUIDSliceFromBytesList

func MustUUIDSliceFromBytesList(data [][]byte) UUIDSlice

func UUIDSliceFromBytesList

func UUIDSliceFromBytesList(data [][]byte) (UUIDSlice, error)

func (UUIDSlice) Len

func (s UUIDSlice) Len() int

Len ...

func (UUIDSlice) Less

func (s UUIDSlice) Less(i, j int) bool

Less ...

func (UUIDSlice) Swap

func (s UUIDSlice) Swap(i, j int)

Swap ...

func (UUIDSlice) ToBytes

func (s UUIDSlice) ToBytes() [][]byte

ToBytes ...

type WhoAmIClient

type WhoAmIClient struct {
	PkgSubject string
	Subject    string
	Encoding   string
	Timeout    time.Duration
	// contains filtered or unexported fields
}

func NewWhoAmIClient

func NewWhoAmIClient(nc nrpc.NatsConn) *WhoAmIClient

func (*WhoAmIClient) WhoAmI

func (c *WhoAmIClient) WhoAmI(identifier string) (*Account, error)

type WhoAmIHandler

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

WhoAmIHandler provides a NATS subscription handler that can serve a subscription using a given WhoAmIServer implementation.

func NewWhoAmIConcurrentHandler

func NewWhoAmIConcurrentHandler(workers *nrpc.WorkerPool, nc nrpc.NatsConn, s WhoAmIServer) *WhoAmIHandler

func NewWhoAmIHandler

func NewWhoAmIHandler(ctx context.Context, nc nrpc.NatsConn, s WhoAmIServer) *WhoAmIHandler

func (*WhoAmIHandler) Handler

func (h *WhoAmIHandler) Handler(msg *nats.Msg)

func (*WhoAmIHandler) SetEncodings

func (h *WhoAmIHandler) SetEncodings(encodings []string)

SetEncodings sets the output encodings when using a '*Publish' function

func (*WhoAmIHandler) Subject

func (h *WhoAmIHandler) Subject() string

type WhoAmIServer

type WhoAmIServer interface {
	WhoAmI(ctx context.Context, identifier string) (*Account, error)
}

WhoAmIServer is the interface that providers of the service WhoAmI should implement.

Directories

Path Synopsis
This code was autogenerated from xbus/control.proto, do not edit.
This code was autogenerated from xbus/control.proto, do not edit.

Jump to

Keyboard shortcuts

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