Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterChipIngressServer(s grpc.ServiceRegistrar, srv ChipIngressServer)
- type ChipIngressClient
- type ChipIngressServer
- type ChipIngress_StreamEventsClient
- type ChipIngress_StreamEventsServer
- type CloudEventBatch
- type EmptyRequest
- type PingResponse
- type PublishResponse
- type PublishResult
- type StreamEventsRequest
- func (*StreamEventsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StreamEventsRequest) GetEvent() *pb.CloudEvent
- func (*StreamEventsRequest) ProtoMessage()
- func (x *StreamEventsRequest) ProtoReflect() protoreflect.Message
- func (x *StreamEventsRequest) Reset()
- func (x *StreamEventsRequest) String() string
- type StreamEventsResponse
- func (*StreamEventsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StreamEventsResponse) GetEventId() string
- func (x *StreamEventsResponse) GetStatus() string
- func (*StreamEventsResponse) ProtoMessage()
- func (x *StreamEventsResponse) ProtoReflect() protoreflect.Message
- func (x *StreamEventsResponse) Reset()
- func (x *StreamEventsResponse) String() string
- type UnimplementedChipIngressServer
- func (UnimplementedChipIngressServer) Ping(context.Context, *EmptyRequest) (*PingResponse, error)
- func (UnimplementedChipIngressServer) Publish(context.Context, *pb.CloudEvent) (*PublishResponse, error)
- func (UnimplementedChipIngressServer) PublishBatch(context.Context, *CloudEventBatch) (*PublishResponse, error)
- func (UnimplementedChipIngressServer) StreamEvents(grpc.BidiStreamingServer[StreamEventsRequest, StreamEventsResponse]) error
- type UnsafeChipIngressServer
Constants ¶
const ( ChipIngress_Publish_FullMethodName = "/chipingress.pb.ChipIngress/Publish" ChipIngress_PublishBatch_FullMethodName = "/chipingress.pb.ChipIngress/PublishBatch" ChipIngress_Ping_FullMethodName = "/chipingress.pb.ChipIngress/Ping" ChipIngress_StreamEvents_FullMethodName = "/chipingress.pb.ChipIngress/StreamEvents" )
Variables ¶
var ChipIngress_ServiceDesc = grpc.ServiceDesc{ ServiceName: "chipingress.pb.ChipIngress", HandlerType: (*ChipIngressServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Publish", Handler: _ChipIngress_Publish_Handler, }, { MethodName: "PublishBatch", Handler: _ChipIngress_PublishBatch_Handler, }, { MethodName: "Ping", Handler: _ChipIngress_Ping_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "StreamEvents", Handler: _ChipIngress_StreamEvents_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "chip_ingress.proto", }
ChipIngress_ServiceDesc is the grpc.ServiceDesc for ChipIngress service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_chip_ingress_proto protoreflect.FileDescriptor
Functions ¶
func RegisterChipIngressServer ¶
func RegisterChipIngressServer(s grpc.ServiceRegistrar, srv ChipIngressServer)
Types ¶
type ChipIngressClient ¶
type ChipIngressClient interface {
// Publish sends a single CloudEvent to the ChipIngress service.
Publish(ctx context.Context, in *pb.CloudEvent, opts ...grpc.CallOption) (*PublishResponse, error)
// PublishBatch sends a batch of CloudEvents to the ChipIngress service.
// This method is atomic, meaning it will either succeed or fail for the entire batch.
// When the server receives a batch of events, it will open a kafka transaction, and begin producing each event sequentially in order received.
// If any 1 message fails, all previous messages in the same batch that were already produced won't be marked as committed,
// and the server will respond with an error.
// Consumers can set isolation.level=read_committed to only read committed records
PublishBatch(ctx context.Context, in *CloudEventBatch, opts ...grpc.CallOption) (*PublishResponse, error)
// Ping sends a request to the ChipIngress service to check if it is alive.
Ping(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*PingResponse, error)
// StreamEvents; EXPERIMENTAL ~ allows clients to stream CloudEvents to the server.
// This API is experimental and may change in the future.
StreamEvents(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StreamEventsRequest, StreamEventsResponse], error)
}
ChipIngressClient is the client API for ChipIngress 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.
ChipIngress service provides a way for senders to produce CloudEvents messages to Kafka
func NewChipIngressClient ¶
func NewChipIngressClient(cc grpc.ClientConnInterface) ChipIngressClient
type ChipIngressServer ¶
type ChipIngressServer interface {
// Publish sends a single CloudEvent to the ChipIngress service.
Publish(context.Context, *pb.CloudEvent) (*PublishResponse, error)
// PublishBatch sends a batch of CloudEvents to the ChipIngress service.
// This method is atomic, meaning it will either succeed or fail for the entire batch.
// When the server receives a batch of events, it will open a kafka transaction, and begin producing each event sequentially in order received.
// If any 1 message fails, all previous messages in the same batch that were already produced won't be marked as committed,
// and the server will respond with an error.
// Consumers can set isolation.level=read_committed to only read committed records
PublishBatch(context.Context, *CloudEventBatch) (*PublishResponse, error)
// Ping sends a request to the ChipIngress service to check if it is alive.
Ping(context.Context, *EmptyRequest) (*PingResponse, error)
// StreamEvents; EXPERIMENTAL ~ allows clients to stream CloudEvents to the server.
// This API is experimental and may change in the future.
StreamEvents(grpc.BidiStreamingServer[StreamEventsRequest, StreamEventsResponse]) error
// contains filtered or unexported methods
}
ChipIngressServer is the server API for ChipIngress service. All implementations must embed UnimplementedChipIngressServer for forward compatibility.
ChipIngress service provides a way for senders to produce CloudEvents messages to Kafka
type ChipIngress_StreamEventsClient ¶
type ChipIngress_StreamEventsClient = grpc.BidiStreamingClient[StreamEventsRequest, StreamEventsResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ChipIngress_StreamEventsServer ¶
type ChipIngress_StreamEventsServer = grpc.BidiStreamingServer[StreamEventsRequest, StreamEventsResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CloudEventBatch ¶
type CloudEventBatch struct {
Events []*pb.CloudEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
// contains filtered or unexported fields
}
CloudEventBatch is used to send many ChipIngress
func (*CloudEventBatch) Descriptor
deprecated
func (*CloudEventBatch) Descriptor() ([]byte, []int)
Deprecated: Use CloudEventBatch.ProtoReflect.Descriptor instead.
func (*CloudEventBatch) GetEvents ¶
func (x *CloudEventBatch) GetEvents() []*pb.CloudEvent
func (*CloudEventBatch) ProtoMessage ¶
func (*CloudEventBatch) ProtoMessage()
func (*CloudEventBatch) ProtoReflect ¶
func (x *CloudEventBatch) ProtoReflect() protoreflect.Message
func (*CloudEventBatch) Reset ¶
func (x *CloudEventBatch) Reset()
func (*CloudEventBatch) String ¶
func (x *CloudEventBatch) String() string
type EmptyRequest ¶
type EmptyRequest struct {
// contains filtered or unexported fields
}
EmptyRequest is just an empty request
func (*EmptyRequest) Descriptor
deprecated
func (*EmptyRequest) Descriptor() ([]byte, []int)
Deprecated: Use EmptyRequest.ProtoReflect.Descriptor instead.
func (*EmptyRequest) ProtoMessage ¶
func (*EmptyRequest) ProtoMessage()
func (*EmptyRequest) ProtoReflect ¶
func (x *EmptyRequest) ProtoReflect() protoreflect.Message
func (*EmptyRequest) Reset ¶
func (x *EmptyRequest) Reset()
func (*EmptyRequest) String ¶
func (x *EmptyRequest) String() string
type PingResponse ¶
type PingResponse struct {
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
PingResponse responds to pings
func (*PingResponse) Descriptor
deprecated
func (*PingResponse) Descriptor() ([]byte, []int)
Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.
func (*PingResponse) GetMessage ¶
func (x *PingResponse) GetMessage() string
func (*PingResponse) ProtoMessage ¶
func (*PingResponse) ProtoMessage()
func (*PingResponse) ProtoReflect ¶
func (x *PingResponse) ProtoReflect() protoreflect.Message
func (*PingResponse) Reset ¶
func (x *PingResponse) Reset()
func (*PingResponse) String ¶
func (x *PingResponse) String() string
type PublishResponse ¶
type PublishResponse struct {
Results []*PublishResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
// contains filtered or unexported fields
}
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) 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 {
EventId string `protobuf:"bytes,1,opt,name=eventId,proto3" json:"eventId,omitempty"`
// contains filtered or unexported fields
}
func (*PublishResult) Descriptor
deprecated
func (*PublishResult) Descriptor() ([]byte, []int)
Deprecated: Use PublishResult.ProtoReflect.Descriptor instead.
func (*PublishResult) GetEventId ¶
func (x *PublishResult) GetEventId() string
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 StreamEventsRequest ¶
type StreamEventsRequest struct {
Event *pb.CloudEvent `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"`
// contains filtered or unexported fields
}
Define request and response messages for the new streaming endpoint
func (*StreamEventsRequest) Descriptor
deprecated
func (*StreamEventsRequest) Descriptor() ([]byte, []int)
Deprecated: Use StreamEventsRequest.ProtoReflect.Descriptor instead.
func (*StreamEventsRequest) GetEvent ¶
func (x *StreamEventsRequest) GetEvent() *pb.CloudEvent
func (*StreamEventsRequest) ProtoMessage ¶
func (*StreamEventsRequest) ProtoMessage()
func (*StreamEventsRequest) ProtoReflect ¶
func (x *StreamEventsRequest) ProtoReflect() protoreflect.Message
func (*StreamEventsRequest) Reset ¶
func (x *StreamEventsRequest) Reset()
func (*StreamEventsRequest) String ¶
func (x *StreamEventsRequest) String() string
type StreamEventsResponse ¶
type StreamEventsResponse struct {
EventId string `protobuf:"bytes,1,opt,name=eventId,proto3" json:"eventId,omitempty"`
Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // e.g., "success", "error"
// contains filtered or unexported fields
}
func (*StreamEventsResponse) Descriptor
deprecated
func (*StreamEventsResponse) Descriptor() ([]byte, []int)
Deprecated: Use StreamEventsResponse.ProtoReflect.Descriptor instead.
func (*StreamEventsResponse) GetEventId ¶
func (x *StreamEventsResponse) GetEventId() string
func (*StreamEventsResponse) GetStatus ¶
func (x *StreamEventsResponse) GetStatus() string
func (*StreamEventsResponse) ProtoMessage ¶
func (*StreamEventsResponse) ProtoMessage()
func (*StreamEventsResponse) ProtoReflect ¶
func (x *StreamEventsResponse) ProtoReflect() protoreflect.Message
func (*StreamEventsResponse) Reset ¶
func (x *StreamEventsResponse) Reset()
func (*StreamEventsResponse) String ¶
func (x *StreamEventsResponse) String() string
type UnimplementedChipIngressServer ¶
type UnimplementedChipIngressServer struct{}
UnimplementedChipIngressServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedChipIngressServer) Ping ¶
func (UnimplementedChipIngressServer) Ping(context.Context, *EmptyRequest) (*PingResponse, error)
func (UnimplementedChipIngressServer) Publish ¶
func (UnimplementedChipIngressServer) Publish(context.Context, *pb.CloudEvent) (*PublishResponse, error)
func (UnimplementedChipIngressServer) PublishBatch ¶
func (UnimplementedChipIngressServer) PublishBatch(context.Context, *CloudEventBatch) (*PublishResponse, error)
func (UnimplementedChipIngressServer) StreamEvents ¶
func (UnimplementedChipIngressServer) StreamEvents(grpc.BidiStreamingServer[StreamEventsRequest, StreamEventsResponse]) error
type UnsafeChipIngressServer ¶
type UnsafeChipIngressServer interface {
// contains filtered or unexported methods
}
UnsafeChipIngressServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ChipIngressServer will result in compilation errors.