Documentation ¶
Index ¶
- Variables
- func RegisterPubSubServer(s grpc.ServiceRegistrar, srv PubSubServer)
- type ConsumerEvent
- func (*ConsumerEvent) Descriptor() ([]byte, []int)deprecated
- func (x *ConsumerEvent) GetEvent() *ProducerEvent
- func (x *ConsumerEvent) GetReplayId() []byte
- func (*ConsumerEvent) ProtoMessage()
- func (x *ConsumerEvent) ProtoReflect() protoreflect.Message
- func (x *ConsumerEvent) Reset()
- func (x *ConsumerEvent) String() string
- type Error
- type ErrorCode
- type EventHeader
- type FetchRequest
- func (*FetchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FetchRequest) GetAuthRefresh() string
- func (x *FetchRequest) GetNumRequested() int32
- func (x *FetchRequest) GetReplayId() []byte
- func (x *FetchRequest) GetReplayPreset() ReplayPreset
- func (x *FetchRequest) GetTopicName() string
- func (*FetchRequest) ProtoMessage()
- func (x *FetchRequest) ProtoReflect() protoreflect.Message
- func (x *FetchRequest) Reset()
- func (x *FetchRequest) String() string
- type FetchResponse
- func (*FetchResponse) Descriptor() ([]byte, []int)deprecated
- func (x *FetchResponse) GetEvents() []*ConsumerEvent
- func (x *FetchResponse) GetLatestReplayId() []byte
- func (x *FetchResponse) GetPendingNumRequested() int32
- func (x *FetchResponse) GetRpcId() string
- func (*FetchResponse) ProtoMessage()
- func (x *FetchResponse) ProtoReflect() protoreflect.Message
- func (x *FetchResponse) Reset()
- func (x *FetchResponse) String() string
- type ProducerEvent
- func (*ProducerEvent) Descriptor() ([]byte, []int)deprecated
- func (x *ProducerEvent) GetHeaders() []*EventHeader
- func (x *ProducerEvent) GetId() string
- func (x *ProducerEvent) GetPayload() []byte
- func (x *ProducerEvent) GetSchemaId() string
- func (*ProducerEvent) ProtoMessage()
- func (x *ProducerEvent) ProtoReflect() protoreflect.Message
- func (x *ProducerEvent) Reset()
- func (x *ProducerEvent) String() string
- type PubSubClient
- type PubSubServer
- type PubSub_PublishStreamClient
- type PubSub_PublishStreamServer
- type PubSub_SubscribeClient
- type PubSub_SubscribeServer
- type PublishRequest
- func (*PublishRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PublishRequest) GetAuthRefresh() string
- func (x *PublishRequest) GetEvents() []*ProducerEvent
- func (x *PublishRequest) GetTopicName() string
- func (*PublishRequest) ProtoMessage()
- func (x *PublishRequest) ProtoReflect() protoreflect.Message
- func (x *PublishRequest) Reset()
- func (x *PublishRequest) String() string
- type PublishResponse
- func (*PublishResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PublishResponse) GetResults() []*PublishResult
- func (x *PublishResponse) GetRpcId() string
- func (x *PublishResponse) GetSchemaId() string
- func (*PublishResponse) ProtoMessage()
- func (x *PublishResponse) ProtoReflect() protoreflect.Message
- func (x *PublishResponse) Reset()
- func (x *PublishResponse) String() string
- type PublishResult
- func (*PublishResult) Descriptor() ([]byte, []int)deprecated
- func (x *PublishResult) GetCorrelationKey() string
- func (x *PublishResult) GetError() *Error
- func (x *PublishResult) GetReplayId() []byte
- func (*PublishResult) ProtoMessage()
- func (x *PublishResult) ProtoReflect() protoreflect.Message
- func (x *PublishResult) Reset()
- func (x *PublishResult) String() string
- type ReplayPreset
- func (ReplayPreset) Descriptor() protoreflect.EnumDescriptor
- func (x ReplayPreset) Enum() *ReplayPreset
- func (ReplayPreset) EnumDescriptor() ([]byte, []int)deprecated
- func (x ReplayPreset) Number() protoreflect.EnumNumber
- func (x ReplayPreset) String() string
- func (ReplayPreset) Type() protoreflect.EnumType
- type SchemaInfo
- func (*SchemaInfo) Descriptor() ([]byte, []int)deprecated
- func (x *SchemaInfo) GetRpcId() string
- func (x *SchemaInfo) GetSchemaId() string
- func (x *SchemaInfo) GetSchemaJson() string
- func (*SchemaInfo) ProtoMessage()
- func (x *SchemaInfo) ProtoReflect() protoreflect.Message
- func (x *SchemaInfo) Reset()
- func (x *SchemaInfo) String() string
- type SchemaRequest
- type TopicInfo
- func (*TopicInfo) Descriptor() ([]byte, []int)deprecated
- func (x *TopicInfo) GetCanPublish() bool
- func (x *TopicInfo) GetCanSubscribe() bool
- func (x *TopicInfo) GetRpcId() string
- func (x *TopicInfo) GetSchemaId() string
- func (x *TopicInfo) GetTenantGuid() string
- func (x *TopicInfo) GetTopicName() string
- func (*TopicInfo) ProtoMessage()
- func (x *TopicInfo) ProtoReflect() protoreflect.Message
- func (x *TopicInfo) Reset()
- func (x *TopicInfo) String() string
- type TopicRequest
- type UnimplementedPubSubServer
- func (UnimplementedPubSubServer) GetSchema(context.Context, *SchemaRequest) (*SchemaInfo, error)
- func (UnimplementedPubSubServer) GetTopic(context.Context, *TopicRequest) (*TopicInfo, error)
- func (UnimplementedPubSubServer) Publish(context.Context, *PublishRequest) (*PublishResponse, error)
- func (UnimplementedPubSubServer) PublishStream(PubSub_PublishStreamServer) error
- func (UnimplementedPubSubServer) Subscribe(PubSub_SubscribeServer) error
- type UnsafePubSubServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrorCode_name = map[int32]string{ 0: "UNKNOWN", 1: "PUBLISH", } ErrorCode_value = map[string]int32{ "UNKNOWN": 0, "PUBLISH": 1, } )
Enum value maps for ErrorCode.
var ( ReplayPreset_name = map[int32]string{ 0: "LATEST", 1: "EARLIEST", 2: "CUSTOM", } ReplayPreset_value = map[string]int32{ "LATEST": 0, "EARLIEST": 1, "CUSTOM": 2, } )
Enum value maps for ReplayPreset.
var File_pubsub_api_proto protoreflect.FileDescriptor
var PubSub_ServiceDesc = grpc.ServiceDesc{ ServiceName: "eventbus.v1.PubSub", HandlerType: (*PubSubServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetSchema", Handler: _PubSub_GetSchema_Handler, }, { MethodName: "GetTopic", Handler: _PubSub_GetTopic_Handler, }, { MethodName: "Publish", Handler: _PubSub_Publish_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Subscribe", Handler: _PubSub_Subscribe_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "PublishStream", Handler: _PubSub_PublishStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "pubsub_api.proto", }
PubSub_ServiceDesc is the grpc.ServiceDesc for PubSub service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPubSubServer ¶
func RegisterPubSubServer(s grpc.ServiceRegistrar, srv PubSubServer)
Types ¶
type ConsumerEvent ¶
type ConsumerEvent struct { // The event with fields identical to ProducerEvent Event *ProducerEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` // The replay ID of the event. // A subscriber app can store the replay ID. When the app restarts, it can resume subscription // starting from events in the event bus after the event with that replay ID. ReplayId []byte `protobuf:"bytes,2,opt,name=replay_id,json=replayId,proto3" json:"replay_id,omitempty"` // contains filtered or unexported fields }
Represents an event that is consumed in a subscriber client. In addition to the fields in ProducerEvent, ConsumerEvent has the replay_id field.
func (*ConsumerEvent) Descriptor
deprecated
func (*ConsumerEvent) Descriptor() ([]byte, []int)
Deprecated: Use ConsumerEvent.ProtoReflect.Descriptor instead.
func (*ConsumerEvent) GetEvent ¶
func (x *ConsumerEvent) GetEvent() *ProducerEvent
func (*ConsumerEvent) GetReplayId ¶
func (x *ConsumerEvent) GetReplayId() []byte
func (*ConsumerEvent) ProtoMessage ¶
func (*ConsumerEvent) ProtoMessage()
func (*ConsumerEvent) ProtoReflect ¶
func (x *ConsumerEvent) ProtoReflect() protoreflect.Message
func (*ConsumerEvent) Reset ¶
func (x *ConsumerEvent) Reset()
func (*ConsumerEvent) String ¶
func (x *ConsumerEvent) String() string
type Error ¶
type Error struct { // Error code Code ErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=eventbus.v1.ErrorCode" json:"code,omitempty"` // Error message Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
Contains error information for an error that an RPC method returns.
func (*Error) Descriptor
deprecated
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
type ErrorCode ¶
type ErrorCode int32
Supported error codes
func (ErrorCode) Descriptor ¶
func (ErrorCode) Descriptor() protoreflect.EnumDescriptor
func (ErrorCode) EnumDescriptor
deprecated
func (ErrorCode) Number ¶
func (x ErrorCode) Number() protoreflect.EnumNumber
func (ErrorCode) Type ¶
func (ErrorCode) Type() protoreflect.EnumType
type EventHeader ¶
type EventHeader struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
Reserved for future use. Header that contains information for distributed tracing, filtering, routing, etc. For example, X-B3-* headers assigned by a publisher are stored with the event and can provide a full distributed trace of the event across its entire lifecycle.
func (*EventHeader) Descriptor
deprecated
func (*EventHeader) Descriptor() ([]byte, []int)
Deprecated: Use EventHeader.ProtoReflect.Descriptor instead.
func (*EventHeader) GetKey ¶
func (x *EventHeader) GetKey() string
func (*EventHeader) GetValue ¶
func (x *EventHeader) GetValue() []byte
func (*EventHeader) ProtoMessage ¶
func (*EventHeader) ProtoMessage()
func (*EventHeader) ProtoReflect ¶
func (x *EventHeader) ProtoReflect() protoreflect.Message
func (*EventHeader) Reset ¶
func (x *EventHeader) Reset()
func (*EventHeader) String ¶
func (x *EventHeader) String() string
type FetchRequest ¶
type FetchRequest struct { // // Identifies a topic for subscription in the very first FetchRequest of the stream. The topic cannot change // in subsequent FetchRequests within the same subscribe stream, but can be omitted for efficiency. TopicName string `protobuf:"bytes,1,opt,name=topic_name,json=topicName,proto3" json:"topic_name,omitempty"` // // Subscription starting point. This is consumed only as part of the first FetchRequest // when the subscription is set up. ReplayPreset ReplayPreset `` /* 128-byte string literal not displayed */ // // If replay_preset of CUSTOM is selected, specify the subscription point to start after. // This is consumed only as part of the first FetchRequest when the subscription is set up. ReplayId []byte `protobuf:"bytes,3,opt,name=replay_id,json=replayId,proto3" json:"replay_id,omitempty"` // // Number of events a client is ready to accept. Each subsequent FetchRequest informs the server // of additional processing capacity available on the client side. There is no guarantee of equal number of // FetchResponse messages to be sent back. There is not necessarily a correspondence between // number of requested events in FetchRequest and the number of events returned in subsequent // FetchResponses. NumRequested int32 `protobuf:"varint,4,opt,name=num_requested,json=numRequested,proto3" json:"num_requested,omitempty"` // For internal Salesforce use only. AuthRefresh string `protobuf:"bytes,5,opt,name=auth_refresh,json=authRefresh,proto3" json:"auth_refresh,omitempty"` // contains filtered or unexported fields }
Request for the Subscribe streaming RPC method. This request is used to: 1. Establish the initial subscribe stream. 2. Request more events from the subscription stream. Flow Control is handled by the subscriber via num_requested. A client can specify a starting point for the subscription with replay_preset and replay_id combinations. If no replay_preset is specified, the subscription starts at LATEST (tip of the stream). replay_preset and replay_id values are only consumed as part of the first FetchRequest. If a client needs to start at another point in the stream, it must start a new subscription.
func (*FetchRequest) Descriptor
deprecated
func (*FetchRequest) Descriptor() ([]byte, []int)
Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead.
func (*FetchRequest) GetAuthRefresh ¶
func (x *FetchRequest) GetAuthRefresh() string
func (*FetchRequest) GetNumRequested ¶
func (x *FetchRequest) GetNumRequested() int32
func (*FetchRequest) GetReplayId ¶
func (x *FetchRequest) GetReplayId() []byte
func (*FetchRequest) GetReplayPreset ¶
func (x *FetchRequest) GetReplayPreset() ReplayPreset
func (*FetchRequest) GetTopicName ¶
func (x *FetchRequest) GetTopicName() string
func (*FetchRequest) ProtoMessage ¶
func (*FetchRequest) ProtoMessage()
func (*FetchRequest) ProtoReflect ¶
func (x *FetchRequest) ProtoReflect() protoreflect.Message
func (*FetchRequest) Reset ¶
func (x *FetchRequest) Reset()
func (*FetchRequest) String ¶
func (x *FetchRequest) String() string
type FetchResponse ¶
type FetchResponse struct { // Received events for subscription for client consumption Events []*ConsumerEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` // Latest replay ID of a subscription. Enables clients with an updated replay value so that they can keep track // of their last consumed replay. Clients will not have to start a subscription at a very old replay in the case where a resubscribe is necessary. LatestReplayId []byte `protobuf:"bytes,2,opt,name=latest_replay_id,json=latestReplayId,proto3" json:"latest_replay_id,omitempty"` // RPC ID used to trace errors. RpcId string `protobuf:"bytes,3,opt,name=rpc_id,json=rpcId,proto3" json:"rpc_id,omitempty"` // Number of remaining events to be delivered to the client for a Subscribe RPC call. PendingNumRequested int32 `protobuf:"varint,4,opt,name=pending_num_requested,json=pendingNumRequested,proto3" json:"pending_num_requested,omitempty"` // contains filtered or unexported fields }
Response for the Subscribe streaming RPC method. This returns ConsumerEvent(s). If there are no events to deliver, the server sends an empty batch fetch response with the latest replay ID. The empty fetch response is sent within 270 seconds. An empty fetch response provides a periodic keepalive from the server and the latest replay ID.
func (*FetchResponse) Descriptor
deprecated
func (*FetchResponse) Descriptor() ([]byte, []int)
Deprecated: Use FetchResponse.ProtoReflect.Descriptor instead.
func (*FetchResponse) GetEvents ¶
func (x *FetchResponse) GetEvents() []*ConsumerEvent
func (*FetchResponse) GetLatestReplayId ¶
func (x *FetchResponse) GetLatestReplayId() []byte
func (*FetchResponse) GetPendingNumRequested ¶
func (x *FetchResponse) GetPendingNumRequested() int32
func (*FetchResponse) GetRpcId ¶
func (x *FetchResponse) GetRpcId() string
func (*FetchResponse) ProtoMessage ¶
func (*FetchResponse) ProtoMessage()
func (*FetchResponse) ProtoReflect ¶
func (x *FetchResponse) ProtoReflect() protoreflect.Message
func (*FetchResponse) Reset ¶
func (x *FetchResponse) Reset()
func (*FetchResponse) String ¶
func (x *FetchResponse) String() string
type ProducerEvent ¶
type ProducerEvent struct { // Either a user-provided ID or a system generated guid Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Schema fingerprint for this event which is hash of the schema SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` // The message data field Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` // Reserved for future use. Key-value pairs of headers. Headers []*EventHeader `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty"` // contains filtered or unexported fields }
Represents an event that an event publishing app creates.
func (*ProducerEvent) Descriptor
deprecated
func (*ProducerEvent) Descriptor() ([]byte, []int)
Deprecated: Use ProducerEvent.ProtoReflect.Descriptor instead.
func (*ProducerEvent) GetHeaders ¶
func (x *ProducerEvent) GetHeaders() []*EventHeader
func (*ProducerEvent) GetId ¶
func (x *ProducerEvent) GetId() string
func (*ProducerEvent) GetPayload ¶
func (x *ProducerEvent) GetPayload() []byte
func (*ProducerEvent) GetSchemaId ¶
func (x *ProducerEvent) GetSchemaId() string
func (*ProducerEvent) ProtoMessage ¶
func (*ProducerEvent) ProtoMessage()
func (*ProducerEvent) ProtoReflect ¶
func (x *ProducerEvent) ProtoReflect() protoreflect.Message
func (*ProducerEvent) Reset ¶
func (x *ProducerEvent) Reset()
func (*ProducerEvent) String ¶
func (x *ProducerEvent) String() string
type PubSubClient ¶
type PubSubClient interface { // // Bidirectional streaming RPC to subscribe to a Topic. The subscription is pull-based. A client can request // for more events as it consumes events. This enables a client to handle flow control based on the client's processing speed. // // Typical flow: // 1. Client requests for X number of events via FetchRequest. // 2. Server receives request and delivers events until X events are delivered to the client via one or more FetchResponse messages. // 3. Client consumes the FetchResponse messages as they come. // 4. Client issues new FetchRequest for Y more number of events. This request can // come before the server has delivered the earlier requested X number of events // so the client gets a continuous stream of events if any. // // If a client requests more events before the server finishes the last // requested amount, the server appends the new amount to the current amount of // events it still needs to fetch and deliver. // // A client can subscribe at any point in the stream by providing a replay option in the first FetchRequest. // The replay option is honored for the first FetchRequest received from a client. Any subsequent FetchRequests with a // new replay option are ignored. A client needs to call the Subscribe RPC again to restart the subscription // at a new point in the stream. // // The first FetchRequest of the stream identifies the topic to subscribe to. // If any subsequent FetchRequest provides topic_name, it must match what // was provided in the first FetchRequest; otherwise, the RPC returns an error // with INVALID_ARGUMENT status. Subscribe(ctx context.Context, opts ...grpc.CallOption) (PubSub_SubscribeClient, error) // Get the event schema for a topic based on a schema ID. GetSchema(ctx context.Context, in *SchemaRequest, opts ...grpc.CallOption) (*SchemaInfo, error) // // Get the topic Information related to the specified topic. GetTopic(ctx context.Context, in *TopicRequest, opts ...grpc.CallOption) (*TopicInfo, error) // // Send a publish request to synchronously publish events to a topic. Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*PublishResponse, error) // // Bidirectional Streaming RPC to publish events to the event bus. // PublishRequest contains the batch of events to publish. // // The first PublishRequest of the stream identifies the topic to publish on. // If any subsequent PublishRequest provides topic_name, it must match what // was provided in the first PublishRequest; otherwise, the RPC returns an error // with INVALID_ARGUMENT status. // // The server returns a PublishResponse for each PublishRequest when publish is // complete for the batch. A client does not have to wait for a PublishResponse // before sending a new PublishRequest, i.e. multiple publish batches can be queued // up, which allows for higher publish rate as a client can asynchronously // publish more events while publishes are still in flight on the server side. // // PublishResponse holds a PublishResult for each event published that indicates success // or failure of the publish. A client can then retry the publish as needed before sending // more PublishRequests for new events to publish. // // A client must send a valid publish request with one or more events every 70 seconds to hold on to the stream. // Otherwise, the server closes the stream and notifies the client. Once the client is notified of the stream closure, // it must make a new PublishStream call to resume publishing. PublishStream(ctx context.Context, opts ...grpc.CallOption) (PubSub_PublishStreamClient, error) }
PubSubClient is the client API for PubSub service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewPubSubClient ¶
func NewPubSubClient(cc grpc.ClientConnInterface) PubSubClient
type PubSubServer ¶
type PubSubServer interface { // // Bidirectional streaming RPC to subscribe to a Topic. The subscription is pull-based. A client can request // for more events as it consumes events. This enables a client to handle flow control based on the client's processing speed. // // Typical flow: // 1. Client requests for X number of events via FetchRequest. // 2. Server receives request and delivers events until X events are delivered to the client via one or more FetchResponse messages. // 3. Client consumes the FetchResponse messages as they come. // 4. Client issues new FetchRequest for Y more number of events. This request can // come before the server has delivered the earlier requested X number of events // so the client gets a continuous stream of events if any. // // If a client requests more events before the server finishes the last // requested amount, the server appends the new amount to the current amount of // events it still needs to fetch and deliver. // // A client can subscribe at any point in the stream by providing a replay option in the first FetchRequest. // The replay option is honored for the first FetchRequest received from a client. Any subsequent FetchRequests with a // new replay option are ignored. A client needs to call the Subscribe RPC again to restart the subscription // at a new point in the stream. // // The first FetchRequest of the stream identifies the topic to subscribe to. // If any subsequent FetchRequest provides topic_name, it must match what // was provided in the first FetchRequest; otherwise, the RPC returns an error // with INVALID_ARGUMENT status. Subscribe(PubSub_SubscribeServer) error // Get the event schema for a topic based on a schema ID. GetSchema(context.Context, *SchemaRequest) (*SchemaInfo, error) // // Get the topic Information related to the specified topic. GetTopic(context.Context, *TopicRequest) (*TopicInfo, error) // // Send a publish request to synchronously publish events to a topic. Publish(context.Context, *PublishRequest) (*PublishResponse, error) // // Bidirectional Streaming RPC to publish events to the event bus. // PublishRequest contains the batch of events to publish. // // The first PublishRequest of the stream identifies the topic to publish on. // If any subsequent PublishRequest provides topic_name, it must match what // was provided in the first PublishRequest; otherwise, the RPC returns an error // with INVALID_ARGUMENT status. // // The server returns a PublishResponse for each PublishRequest when publish is // complete for the batch. A client does not have to wait for a PublishResponse // before sending a new PublishRequest, i.e. multiple publish batches can be queued // up, which allows for higher publish rate as a client can asynchronously // publish more events while publishes are still in flight on the server side. // // PublishResponse holds a PublishResult for each event published that indicates success // or failure of the publish. A client can then retry the publish as needed before sending // more PublishRequests for new events to publish. // // A client must send a valid publish request with one or more events every 70 seconds to hold on to the stream. // Otherwise, the server closes the stream and notifies the client. Once the client is notified of the stream closure, // it must make a new PublishStream call to resume publishing. PublishStream(PubSub_PublishStreamServer) error // contains filtered or unexported methods }
PubSubServer is the server API for PubSub service. All implementations must embed UnimplementedPubSubServer for forward compatibility
type PubSub_PublishStreamClient ¶
type PubSub_PublishStreamClient interface { Send(*PublishRequest) error Recv() (*PublishResponse, error) grpc.ClientStream }
type PubSub_PublishStreamServer ¶
type PubSub_PublishStreamServer interface { Send(*PublishResponse) error Recv() (*PublishRequest, error) grpc.ServerStream }
type PubSub_SubscribeClient ¶
type PubSub_SubscribeClient interface { Send(*FetchRequest) error Recv() (*FetchResponse, error) grpc.ClientStream }
type PubSub_SubscribeServer ¶
type PubSub_SubscribeServer interface { Send(*FetchResponse) error Recv() (*FetchRequest, error) grpc.ServerStream }
type PublishRequest ¶
type PublishRequest struct { // Topic to publish on TopicName string `protobuf:"bytes,1,opt,name=topic_name,json=topicName,proto3" json:"topic_name,omitempty"` // Batch of ProducerEvent(s) to send Events []*ProducerEvent `protobuf:"bytes,2,rep,name=events,proto3" json:"events,omitempty"` // For internal Salesforce use only. AuthRefresh string `protobuf:"bytes,3,opt,name=auth_refresh,json=authRefresh,proto3" json:"auth_refresh,omitempty"` // contains filtered or unexported fields }
Request for the Publish and PublishStream RPC method.
func (*PublishRequest) Descriptor
deprecated
func (*PublishRequest) Descriptor() ([]byte, []int)
Deprecated: Use PublishRequest.ProtoReflect.Descriptor instead.
func (*PublishRequest) GetAuthRefresh ¶
func (x *PublishRequest) GetAuthRefresh() string
func (*PublishRequest) GetEvents ¶
func (x *PublishRequest) GetEvents() []*ProducerEvent
func (*PublishRequest) GetTopicName ¶
func (x *PublishRequest) GetTopicName() string
func (*PublishRequest) ProtoMessage ¶
func (*PublishRequest) ProtoMessage()
func (*PublishRequest) ProtoReflect ¶
func (x *PublishRequest) ProtoReflect() protoreflect.Message
func (*PublishRequest) Reset ¶
func (x *PublishRequest) Reset()
func (*PublishRequest) String ¶
func (x *PublishRequest) String() string
type PublishResponse ¶
type PublishResponse struct { // Publish results Results []*PublishResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // Schema fingerprint for this event, which is a hash of the schema SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` // RPC ID used to trace errors. RpcId string `protobuf:"bytes,3,opt,name=rpc_id,json=rpcId,proto3" json:"rpc_id,omitempty"` // contains filtered or unexported fields }
Response for the Publish and PublishStream RPC methods. This returns a list of PublishResults for each event that the client attempted to publish. PublishResult indicates if publish succeeded or not for each event. It also returns the schema ID that was used to create the ProducerEvents in the PublishRequest.
func (*PublishResponse) Descriptor
deprecated
func (*PublishResponse) Descriptor() ([]byte, []int)
Deprecated: Use PublishResponse.ProtoReflect.Descriptor instead.
func (*PublishResponse) GetResults ¶
func (x *PublishResponse) GetResults() []*PublishResult
func (*PublishResponse) GetRpcId ¶
func (x *PublishResponse) GetRpcId() string
func (*PublishResponse) GetSchemaId ¶
func (x *PublishResponse) GetSchemaId() string
func (*PublishResponse) ProtoMessage ¶
func (*PublishResponse) ProtoMessage()
func (*PublishResponse) ProtoReflect ¶
func (x *PublishResponse) ProtoReflect() protoreflect.Message
func (*PublishResponse) Reset ¶
func (x *PublishResponse) Reset()
func (*PublishResponse) String ¶
func (x *PublishResponse) String() string
type PublishResult ¶
type PublishResult struct { // Replay ID of the event ReplayId []byte `protobuf:"bytes,1,opt,name=replay_id,json=replayId,proto3" json:"replay_id,omitempty"` // Publish error if any Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // Correlation key of the ProducerEvent CorrelationKey string `protobuf:"bytes,3,opt,name=correlationKey,proto3" json:"correlationKey,omitempty"` // contains filtered or unexported fields }
Event publish result that the Publish RPC method returns. The result contains replay_id or a publish error.
func (*PublishResult) Descriptor
deprecated
func (*PublishResult) Descriptor() ([]byte, []int)
Deprecated: Use PublishResult.ProtoReflect.Descriptor instead.
func (*PublishResult) GetCorrelationKey ¶
func (x *PublishResult) GetCorrelationKey() string
func (*PublishResult) GetError ¶
func (x *PublishResult) GetError() *Error
func (*PublishResult) GetReplayId ¶
func (x *PublishResult) GetReplayId() []byte
func (*PublishResult) ProtoMessage ¶
func (*PublishResult) ProtoMessage()
func (*PublishResult) ProtoReflect ¶
func (x *PublishResult) ProtoReflect() protoreflect.Message
func (*PublishResult) Reset ¶
func (x *PublishResult) Reset()
func (*PublishResult) String ¶
func (x *PublishResult) String() string
type ReplayPreset ¶
type ReplayPreset int32
Supported subscription replay start values. By default, the subscription will start at the tip of the stream if ReplayPreset is not specified.
const ( // Start the subscription at the tip of the stream. ReplayPreset_LATEST ReplayPreset = 0 // Start the subscription at the earliest point in the stream. ReplayPreset_EARLIEST ReplayPreset = 1 // Start the subscription after a custom point in the stream. This must be set with a valid replay_id in the FetchRequest. ReplayPreset_CUSTOM ReplayPreset = 2 )
func (ReplayPreset) Descriptor ¶
func (ReplayPreset) Descriptor() protoreflect.EnumDescriptor
func (ReplayPreset) Enum ¶
func (x ReplayPreset) Enum() *ReplayPreset
func (ReplayPreset) EnumDescriptor
deprecated
func (ReplayPreset) EnumDescriptor() ([]byte, []int)
Deprecated: Use ReplayPreset.Descriptor instead.
func (ReplayPreset) Number ¶
func (x ReplayPreset) Number() protoreflect.EnumNumber
func (ReplayPreset) String ¶
func (x ReplayPreset) String() string
func (ReplayPreset) Type ¶
func (ReplayPreset) Type() protoreflect.EnumType
type SchemaInfo ¶
type SchemaInfo struct { // Avro schema in JSON format SchemaJson string `protobuf:"bytes,1,opt,name=schema_json,json=schemaJson,proto3" json:"schema_json,omitempty"` // Schema fingerprint SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` // RPC ID used to trace errors. RpcId string `protobuf:"bytes,3,opt,name=rpc_id,json=rpcId,proto3" json:"rpc_id,omitempty"` // contains filtered or unexported fields }
Response for the GetSchema RPC method. This returns the schema ID and schema of an event.
func (*SchemaInfo) Descriptor
deprecated
func (*SchemaInfo) Descriptor() ([]byte, []int)
Deprecated: Use SchemaInfo.ProtoReflect.Descriptor instead.
func (*SchemaInfo) GetRpcId ¶
func (x *SchemaInfo) GetRpcId() string
func (*SchemaInfo) GetSchemaId ¶
func (x *SchemaInfo) GetSchemaId() string
func (*SchemaInfo) GetSchemaJson ¶
func (x *SchemaInfo) GetSchemaJson() string
func (*SchemaInfo) ProtoMessage ¶
func (*SchemaInfo) ProtoMessage()
func (*SchemaInfo) ProtoReflect ¶
func (x *SchemaInfo) ProtoReflect() protoreflect.Message
func (*SchemaInfo) Reset ¶
func (x *SchemaInfo) Reset()
func (*SchemaInfo) String ¶
func (x *SchemaInfo) String() string
type SchemaRequest ¶
type SchemaRequest struct { // Schema fingerprint for this event, which is a hash of the schema. SchemaId string `protobuf:"bytes,1,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` // contains filtered or unexported fields }
Request for the GetSchema RPC method. The schema request is based on the event schema ID.
func (*SchemaRequest) Descriptor
deprecated
func (*SchemaRequest) Descriptor() ([]byte, []int)
Deprecated: Use SchemaRequest.ProtoReflect.Descriptor instead.
func (*SchemaRequest) GetSchemaId ¶
func (x *SchemaRequest) GetSchemaId() string
func (*SchemaRequest) ProtoMessage ¶
func (*SchemaRequest) ProtoMessage()
func (*SchemaRequest) ProtoReflect ¶
func (x *SchemaRequest) ProtoReflect() protoreflect.Message
func (*SchemaRequest) Reset ¶
func (x *SchemaRequest) Reset()
func (*SchemaRequest) String ¶
func (x *SchemaRequest) String() string
type TopicInfo ¶
type TopicInfo struct { // Topic name TopicName string `protobuf:"bytes,1,opt,name=topic_name,json=topicName,proto3" json:"topic_name,omitempty"` // Tenant/org GUID TenantGuid string `protobuf:"bytes,2,opt,name=tenant_guid,json=tenantGuid,proto3" json:"tenant_guid,omitempty"` // Is publishing allowed? CanPublish bool `protobuf:"varint,3,opt,name=can_publish,json=canPublish,proto3" json:"can_publish,omitempty"` // Is subscription allowed? CanSubscribe bool `protobuf:"varint,4,opt,name=can_subscribe,json=canSubscribe,proto3" json:"can_subscribe,omitempty"` // ID of the current topic schema, which can be used for // publishing of generically serialized events. SchemaId string `protobuf:"bytes,5,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` // RPC ID used to trace errors. RpcId string `protobuf:"bytes,6,opt,name=rpc_id,json=rpcId,proto3" json:"rpc_id,omitempty"` // contains filtered or unexported fields }
Contains information about a topic and uniquely identifies it. TopicInfo is returned by the GetTopic RPC method.
func (*TopicInfo) Descriptor
deprecated
func (*TopicInfo) GetCanPublish ¶
func (*TopicInfo) GetCanSubscribe ¶
func (*TopicInfo) GetSchemaId ¶
func (*TopicInfo) GetTenantGuid ¶
func (*TopicInfo) GetTopicName ¶
func (*TopicInfo) ProtoMessage ¶
func (*TopicInfo) ProtoMessage()
func (*TopicInfo) ProtoReflect ¶
func (x *TopicInfo) ProtoReflect() protoreflect.Message
type TopicRequest ¶
type TopicRequest struct { // The name of the topic to retrieve. TopicName string `protobuf:"bytes,1,opt,name=topic_name,json=topicName,proto3" json:"topic_name,omitempty"` // contains filtered or unexported fields }
A request message for GetTopic. Note that the tenant/org is not directly referenced in the request, but is implicitly identified by the authentication headers.
func (*TopicRequest) Descriptor
deprecated
func (*TopicRequest) Descriptor() ([]byte, []int)
Deprecated: Use TopicRequest.ProtoReflect.Descriptor instead.
func (*TopicRequest) GetTopicName ¶
func (x *TopicRequest) GetTopicName() string
func (*TopicRequest) ProtoMessage ¶
func (*TopicRequest) ProtoMessage()
func (*TopicRequest) ProtoReflect ¶
func (x *TopicRequest) ProtoReflect() protoreflect.Message
func (*TopicRequest) Reset ¶
func (x *TopicRequest) Reset()
func (*TopicRequest) String ¶
func (x *TopicRequest) String() string
type UnimplementedPubSubServer ¶
type UnimplementedPubSubServer struct { }
UnimplementedPubSubServer must be embedded to have forward compatible implementations.
func (UnimplementedPubSubServer) GetSchema ¶
func (UnimplementedPubSubServer) GetSchema(context.Context, *SchemaRequest) (*SchemaInfo, error)
func (UnimplementedPubSubServer) GetTopic ¶
func (UnimplementedPubSubServer) GetTopic(context.Context, *TopicRequest) (*TopicInfo, error)
func (UnimplementedPubSubServer) Publish ¶
func (UnimplementedPubSubServer) Publish(context.Context, *PublishRequest) (*PublishResponse, error)
func (UnimplementedPubSubServer) PublishStream ¶
func (UnimplementedPubSubServer) PublishStream(PubSub_PublishStreamServer) error
func (UnimplementedPubSubServer) Subscribe ¶
func (UnimplementedPubSubServer) Subscribe(PubSub_SubscribeServer) error
type UnsafePubSubServer ¶
type UnsafePubSubServer interface {
// contains filtered or unexported methods
}
UnsafePubSubServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PubSubServer will result in compilation errors.