Documentation
¶
Index ¶
- type ChipIngressClient
- type ChipIngress_StreamEventsClient
- type Client
- type CloudEvent
- type CloudEventBatch
- type CloudEventPb
- type EmptyRequest
- type HeaderProvider
- type NoopClient
- func (NoopClient) Close() error
- func (NoopClient) Ping(ctx context.Context, in *pb.EmptyRequest, opts ...grpc.CallOption) (*pb.PingResponse, error)
- func (NoopClient) Publish(ctx context.Context, in *cepb.CloudEvent, opts ...grpc.CallOption) (*pb.PublishResponse, error)
- func (NoopClient) PublishBatch(ctx context.Context, in *pb.CloudEventBatch, opts ...grpc.CallOption) (*pb.PublishResponse, error)
- func (NoopClient) RegisterSchema(ctx context.Context, in *pb.RegisterSchemaRequest, opts ...grpc.CallOption) (*pb.RegisterSchemaResponse, error)
- func (NoopClient) RegisterSchemas(ctx context.Context, schemas ...*pb.Schema) (map[string]int, error)
- func (NoopClient) StreamEvents(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[pb.StreamEventsRequest, pb.StreamEventsResponse], ...)
- type Opt
- func WithBasicAuth(user, pass string) Opt
- func WithHeaderProvider(provider HeaderProvider) Opt
- func WithInsecureConnection() Opt
- func WithMeterProvider(provider metric.MeterProvider) Opt
- func WithTLS() Opt
- func WithTokenAuth(tokenProvider HeaderProvider) Opt
- func WithTracerProvider(provider trace.TracerProvider) Opt
- func WithTransportCredentials(creds credentials.TransportCredentials) Opt
- type PingResponse
- type PublishResponse
- type PublishResult
- type StreamEventsRequest
- type StreamEventsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChipIngress_StreamEventsClient ¶
type ChipIngress_StreamEventsClient = pb.ChipIngress_StreamEventsClient
type Client ¶
type CloudEvent ¶
Cloudevents types
func NewEvent ¶
NewEvent creates a new CloudEvent with the specified domain, entity, payload, and optional attributes.
func ProtoToEvent ¶
func ProtoToEvent(eventPb *CloudEventPb) (CloudEvent, error)
type CloudEventBatch ¶
type CloudEventBatch = pb.CloudEventBatch
Message types
func EventsToBatch ¶
func EventsToBatch(events []CloudEvent) (*CloudEventBatch, error)
type CloudEventPb ¶
type CloudEventPb = cepb.CloudEvent
func EventToProto ¶
func EventToProto(event CloudEvent) (*CloudEventPb, error)
type EmptyRequest ¶
type EmptyRequest = pb.EmptyRequest
type HeaderProvider ¶
type NoopClient ¶ added in v0.0.10
type NoopClient struct{}
NoopClient is a no-op implementation of the Client interface. All methods return successfully without performing any actual operations.
func (NoopClient) Ping ¶ added in v0.0.10
func (NoopClient) Ping(ctx context.Context, in *pb.EmptyRequest, opts ...grpc.CallOption) (*pb.PingResponse, error)
Ping is a no-op
func (NoopClient) Publish ¶ added in v0.0.10
func (NoopClient) Publish(ctx context.Context, in *cepb.CloudEvent, opts ...grpc.CallOption) (*pb.PublishResponse, error)
Publish is a no-op
func (NoopClient) PublishBatch ¶ added in v0.0.10
func (NoopClient) PublishBatch(ctx context.Context, in *pb.CloudEventBatch, opts ...grpc.CallOption) (*pb.PublishResponse, error)
PublishBatch is a no-op
func (NoopClient) RegisterSchema ¶ added in v0.0.10
func (NoopClient) RegisterSchema(ctx context.Context, in *pb.RegisterSchemaRequest, opts ...grpc.CallOption) (*pb.RegisterSchemaResponse, error)
RegisterSchema is a no-op
func (NoopClient) RegisterSchemas ¶ added in v0.0.10
func (NoopClient) RegisterSchemas(ctx context.Context, schemas ...*pb.Schema) (map[string]int, error)
RegisterSchemas is a no-op
func (NoopClient) StreamEvents ¶ added in v0.0.10
func (NoopClient) StreamEvents(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[pb.StreamEventsRequest, pb.StreamEventsResponse], error)
StreamEvents is a no-op
type Opt ¶
type Opt func(*clientConfig)
Opt defines a function type for configuring the ChipIngressClient.
func WithBasicAuth ¶
WithBasicAuth sets the basic-auth credentials for the ChipIngress service. Default is to require TLS for security.
func WithHeaderProvider ¶
func WithHeaderProvider(provider HeaderProvider) Opt
WithHeaderProvider sets a dynamic header provider for requests NOTE: for CSA-Key based authentication, use WithTokenAuth instead.
func WithInsecureConnection ¶
func WithInsecureConnection() Opt
WithInsecureConnection configures the client to use an insecure connection (no TLS).
func WithMeterProvider ¶ added in v0.0.8
func WithMeterProvider(provider metric.MeterProvider) Opt
WithMeterProvider sets a custom OpenTelemetry MeterProvider for metrics collection. If not set, the global meter provider will be used.
func WithTokenAuth ¶
func WithTokenAuth(tokenProvider HeaderProvider) Opt
WithTokenAuth sets the token-based credentials for the ChipIngress service. Use for CSA-Key based authentication.
func WithTracerProvider ¶ added in v0.0.8
func WithTracerProvider(provider trace.TracerProvider) Opt
WithTracerProvider sets a custom OpenTelemetry TracerProvider for distributed tracing. If not set, the global tracer provider will be used.
func WithTransportCredentials ¶
func WithTransportCredentials(creds credentials.TransportCredentials) Opt
WithTransportCredentials sets the transport custom credentials for the ChipIngress service.
type PingResponse ¶
type PingResponse = pb.PingResponse
type PublishResponse ¶
type PublishResponse = pb.PublishResponse
type PublishResult ¶
type PublishResult = pb.PublishResult
type StreamEventsRequest ¶
type StreamEventsRequest = pb.StreamEventsRequest
type StreamEventsResponse ¶
type StreamEventsResponse = pb.StreamEventsResponse