Documentation
¶
Overview ¶
Note: the proto_path below directive ensures the generated protobuf's file descriptor has a fully qualified path, ensuring we avoid conflicts with other files called messages.proto
Index ¶
- Constants
- Variables
- type Aggregator
- type DON
- type Dispatcher
- type Error
- type Message
- type MessageBody
- func (*MessageBody) Descriptor() ([]byte, []int)deprecated
- func (x *MessageBody) GetCallerDonId() uint32
- func (x *MessageBody) GetCapabilityDonId() uint32
- func (x *MessageBody) GetCapabilityId() string
- func (x *MessageBody) GetError() Error
- func (x *MessageBody) GetErrorMsg() string
- func (x *MessageBody) GetMessageId() []byte
- func (m *MessageBody) GetMetadata() isMessageBody_Metadata
- func (x *MessageBody) GetMethod() string
- func (x *MessageBody) GetPayload() []byte
- func (x *MessageBody) GetReceiver() []byte
- func (x *MessageBody) GetSender() []byte
- func (x *MessageBody) GetTimestamp() int64
- func (x *MessageBody) GetTriggerEventMetadata() *TriggerEventMetadata
- func (x *MessageBody) GetTriggerRegistrationMetadata() *TriggerRegistrationMetadata
- func (x *MessageBody) GetVersion() uint32
- func (*MessageBody) ProtoMessage()
- func (x *MessageBody) ProtoReflect() protoreflect.Message
- func (x *MessageBody) Reset()
- func (x *MessageBody) String() string
- type MessageBody_TriggerEventMetadata
- type MessageBody_TriggerRegistrationMetadata
- type Receiver
- type RemoteTriggerConfig
- func (c *RemoteTriggerConfig) ApplyDefaults()
- func (*RemoteTriggerConfig) Descriptor() ([]byte, []int)deprecated
- func (x *RemoteTriggerConfig) GetMessageExpiryMs() uint32
- func (x *RemoteTriggerConfig) GetMinResponsesToAggregate() uint32
- func (x *RemoteTriggerConfig) GetRegistrationExpiryMs() uint32
- func (x *RemoteTriggerConfig) GetRegistrationRefreshMs() uint32
- func (*RemoteTriggerConfig) ProtoMessage()
- func (x *RemoteTriggerConfig) ProtoReflect() protoreflect.Message
- func (x *RemoteTriggerConfig) Reset()
- func (x *RemoteTriggerConfig) String() string
- type TriggerEventMetadata
- func (*TriggerEventMetadata) Descriptor() ([]byte, []int)deprecated
- func (x *TriggerEventMetadata) GetTriggerEventId() string
- func (x *TriggerEventMetadata) GetWorkflowIds() []string
- func (*TriggerEventMetadata) ProtoMessage()
- func (x *TriggerEventMetadata) ProtoReflect() protoreflect.Message
- func (x *TriggerEventMetadata) Reset()
- func (x *TriggerEventMetadata) String() string
- type TriggerRegistrationMetadata
- func (*TriggerRegistrationMetadata) Descriptor() ([]byte, []int)deprecated
- func (x *TriggerRegistrationMetadata) GetLastReceivedEventId() string
- func (*TriggerRegistrationMetadata) ProtoMessage()
- func (x *TriggerRegistrationMetadata) ProtoReflect() protoreflect.Message
- func (x *TriggerRegistrationMetadata) Reset()
- func (x *TriggerRegistrationMetadata) String() string
Constants ¶
View Source
const ( DefaultRegistrationRefreshMs = 30_000 DefaultRegistrationExpiryMs = 120_000 DefaultMessageExpiryMs = 120_000 )
View Source
const ( MethodRegisterTrigger = "RegisterTrigger" MethodUnRegisterTrigger = "UnregisterTrigger" MethodTriggerEvent = "TriggerEvent" MethodExecute = "Execute" )
Variables ¶
View Source
var ( Error_name = map[int32]string{ 0: "OK", 1: "VALIDATION_FAILED", 2: "CAPABILITY_NOT_FOUND", 3: "INVALID_REQUEST", 4: "TIMEOUT", 5: "INTERNAL_ERROR", } Error_value = map[string]int32{ "OK": 0, "VALIDATION_FAILED": 1, "CAPABILITY_NOT_FOUND": 2, "INVALID_REQUEST": 3, "TIMEOUT": 4, "INTERNAL_ERROR": 5, } )
Enum value maps for Error.
View Source
var File_core_capabilities_remote_types_messages_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Aggregator ¶
type Aggregator interface {
Aggregate(eventID string, responses [][]byte) (commoncap.CapabilityResponse, error)
}
type Dispatcher ¶
type Error ¶
type Error int32
func (Error) Descriptor ¶
func (Error) Descriptor() protoreflect.EnumDescriptor
func (Error) EnumDescriptor
deprecated
func (Error) Number ¶
func (x Error) Number() protoreflect.EnumNumber
func (Error) Type ¶
func (Error) Type() protoreflect.EnumType
type Message ¶
type Message struct { Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"` Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` // proto-encoded MessageBody to sign // contains filtered or unexported fields }
func (*Message) Descriptor
deprecated
func (*Message) GetSignature ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type MessageBody ¶
type MessageBody struct { Version uint32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` Sender []byte `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` Receiver []byte `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"` MessageId []byte `protobuf:"bytes,5,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` // scoped to sender CapabilityId string `protobuf:"bytes,6,opt,name=capability_id,json=capabilityId,proto3" json:"capability_id,omitempty"` Method string `protobuf:"bytes,9,opt,name=method,proto3" json:"method,omitempty"` Error Error `protobuf:"varint,10,opt,name=error,proto3,enum=remote.Error" json:"error,omitempty"` ErrorMsg string `protobuf:"bytes,11,opt,name=errorMsg,proto3" json:"errorMsg,omitempty"` // payload contains a CapabilityRequest or CapabilityResponse Payload []byte `protobuf:"bytes,12,opt,name=payload,proto3" json:"payload,omitempty"` // Types that are assignable to Metadata: // // *MessageBody_TriggerRegistrationMetadata // *MessageBody_TriggerEventMetadata Metadata isMessageBody_Metadata `protobuf_oneof:"metadata"` CapabilityDonId uint32 `protobuf:"varint,15,opt,name=capability_don_id,json=capabilityDonId,proto3" json:"capability_don_id,omitempty"` CallerDonId uint32 `protobuf:"varint,16,opt,name=caller_don_id,json=callerDonId,proto3" json:"caller_don_id,omitempty"` // contains filtered or unexported fields }
func (*MessageBody) Descriptor
deprecated
func (*MessageBody) Descriptor() ([]byte, []int)
Deprecated: Use MessageBody.ProtoReflect.Descriptor instead.
func (*MessageBody) GetCallerDonId ¶
func (x *MessageBody) GetCallerDonId() uint32
func (*MessageBody) GetCapabilityDonId ¶
func (x *MessageBody) GetCapabilityDonId() uint32
func (*MessageBody) GetCapabilityId ¶
func (x *MessageBody) GetCapabilityId() string
func (*MessageBody) GetError ¶
func (x *MessageBody) GetError() Error
func (*MessageBody) GetErrorMsg ¶ added in v2.13.0
func (x *MessageBody) GetErrorMsg() string
func (*MessageBody) GetMessageId ¶
func (x *MessageBody) GetMessageId() []byte
func (*MessageBody) GetMetadata ¶
func (m *MessageBody) GetMetadata() isMessageBody_Metadata
func (*MessageBody) GetMethod ¶
func (x *MessageBody) GetMethod() string
func (*MessageBody) GetPayload ¶
func (x *MessageBody) GetPayload() []byte
func (*MessageBody) GetReceiver ¶
func (x *MessageBody) GetReceiver() []byte
func (*MessageBody) GetSender ¶
func (x *MessageBody) GetSender() []byte
func (*MessageBody) GetTimestamp ¶
func (x *MessageBody) GetTimestamp() int64
func (*MessageBody) GetTriggerEventMetadata ¶
func (x *MessageBody) GetTriggerEventMetadata() *TriggerEventMetadata
func (*MessageBody) GetTriggerRegistrationMetadata ¶
func (x *MessageBody) GetTriggerRegistrationMetadata() *TriggerRegistrationMetadata
func (*MessageBody) GetVersion ¶
func (x *MessageBody) GetVersion() uint32
func (*MessageBody) ProtoMessage ¶
func (*MessageBody) ProtoMessage()
func (*MessageBody) ProtoReflect ¶
func (x *MessageBody) ProtoReflect() protoreflect.Message
func (*MessageBody) Reset ¶
func (x *MessageBody) Reset()
func (*MessageBody) String ¶
func (x *MessageBody) String() string
type MessageBody_TriggerEventMetadata ¶
type MessageBody_TriggerEventMetadata struct {
TriggerEventMetadata *TriggerEventMetadata `protobuf:"bytes,14,opt,name=trigger_event_metadata,json=triggerEventMetadata,proto3,oneof"`
}
type MessageBody_TriggerRegistrationMetadata ¶
type MessageBody_TriggerRegistrationMetadata struct {
TriggerRegistrationMetadata *TriggerRegistrationMetadata `protobuf:"bytes,13,opt,name=trigger_registration_metadata,json=triggerRegistrationMetadata,proto3,oneof"`
}
type Receiver ¶
type Receiver interface {
Receive(ctx context.Context, msg *MessageBody)
}
type RemoteTriggerConfig ¶
type RemoteTriggerConfig struct { RegistrationRefreshMs uint32 `protobuf:"varint,1,opt,name=registrationRefreshMs,proto3" json:"registrationRefreshMs,omitempty"` RegistrationExpiryMs uint32 `protobuf:"varint,2,opt,name=registrationExpiryMs,proto3" json:"registrationExpiryMs,omitempty"` MinResponsesToAggregate uint32 `protobuf:"varint,3,opt,name=minResponsesToAggregate,proto3" json:"minResponsesToAggregate,omitempty"` MessageExpiryMs uint32 `protobuf:"varint,4,opt,name=messageExpiryMs,proto3" json:"messageExpiryMs,omitempty"` // contains filtered or unexported fields }
func (*RemoteTriggerConfig) ApplyDefaults ¶
func (c *RemoteTriggerConfig) ApplyDefaults()
NOTE: consider splitting this config into values stored in Registry (KS-118) and values defined locally by Capability owners.
func (*RemoteTriggerConfig) Descriptor
deprecated
added in
v2.14.0
func (*RemoteTriggerConfig) Descriptor() ([]byte, []int)
Deprecated: Use RemoteTriggerConfig.ProtoReflect.Descriptor instead.
func (*RemoteTriggerConfig) GetMessageExpiryMs ¶ added in v2.14.0
func (x *RemoteTriggerConfig) GetMessageExpiryMs() uint32
func (*RemoteTriggerConfig) GetMinResponsesToAggregate ¶ added in v2.14.0
func (x *RemoteTriggerConfig) GetMinResponsesToAggregate() uint32
func (*RemoteTriggerConfig) GetRegistrationExpiryMs ¶ added in v2.14.0
func (x *RemoteTriggerConfig) GetRegistrationExpiryMs() uint32
func (*RemoteTriggerConfig) GetRegistrationRefreshMs ¶ added in v2.14.0
func (x *RemoteTriggerConfig) GetRegistrationRefreshMs() uint32
func (*RemoteTriggerConfig) ProtoMessage ¶ added in v2.14.0
func (*RemoteTriggerConfig) ProtoMessage()
func (*RemoteTriggerConfig) ProtoReflect ¶ added in v2.14.0
func (x *RemoteTriggerConfig) ProtoReflect() protoreflect.Message
func (*RemoteTriggerConfig) Reset ¶ added in v2.14.0
func (x *RemoteTriggerConfig) Reset()
func (*RemoteTriggerConfig) String ¶ added in v2.14.0
func (x *RemoteTriggerConfig) String() string
type TriggerEventMetadata ¶
type TriggerEventMetadata struct { TriggerEventId string `protobuf:"bytes,1,opt,name=trigger_event_id,json=triggerEventId,proto3" json:"trigger_event_id,omitempty"` WorkflowIds []string `protobuf:"bytes,2,rep,name=workflow_ids,json=workflowIds,proto3" json:"workflow_ids,omitempty"` // contains filtered or unexported fields }
func (*TriggerEventMetadata) Descriptor
deprecated
func (*TriggerEventMetadata) Descriptor() ([]byte, []int)
Deprecated: Use TriggerEventMetadata.ProtoReflect.Descriptor instead.
func (*TriggerEventMetadata) GetTriggerEventId ¶
func (x *TriggerEventMetadata) GetTriggerEventId() string
func (*TriggerEventMetadata) GetWorkflowIds ¶
func (x *TriggerEventMetadata) GetWorkflowIds() []string
func (*TriggerEventMetadata) ProtoMessage ¶
func (*TriggerEventMetadata) ProtoMessage()
func (*TriggerEventMetadata) ProtoReflect ¶
func (x *TriggerEventMetadata) ProtoReflect() protoreflect.Message
func (*TriggerEventMetadata) Reset ¶
func (x *TriggerEventMetadata) Reset()
func (*TriggerEventMetadata) String ¶
func (x *TriggerEventMetadata) String() string
type TriggerRegistrationMetadata ¶
type TriggerRegistrationMetadata struct { LastReceivedEventId string `protobuf:"bytes,1,opt,name=last_received_event_id,json=lastReceivedEventId,proto3" json:"last_received_event_id,omitempty"` // contains filtered or unexported fields }
func (*TriggerRegistrationMetadata) Descriptor
deprecated
func (*TriggerRegistrationMetadata) Descriptor() ([]byte, []int)
Deprecated: Use TriggerRegistrationMetadata.ProtoReflect.Descriptor instead.
func (*TriggerRegistrationMetadata) GetLastReceivedEventId ¶
func (x *TriggerRegistrationMetadata) GetLastReceivedEventId() string
func (*TriggerRegistrationMetadata) ProtoMessage ¶
func (*TriggerRegistrationMetadata) ProtoMessage()
func (*TriggerRegistrationMetadata) ProtoReflect ¶
func (x *TriggerRegistrationMetadata) ProtoReflect() protoreflect.Message
func (*TriggerRegistrationMetadata) Reset ¶
func (x *TriggerRegistrationMetadata) Reset()
func (*TriggerRegistrationMetadata) String ¶
func (x *TriggerRegistrationMetadata) String() string
Click to show internal directories.
Click to hide internal directories.