chipingress

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: MIT Imports: 15 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChipIngressClient

type ChipIngressClient = pb.ChipIngressClient

Client

type ChipIngress_StreamEventsClient added in v0.8.0

type ChipIngress_StreamEventsClient = pb.ChipIngress_StreamEventsClient

type Client added in v0.8.0

type Client interface {
	pb.ChipIngressClient
	Close() error
}

func NewClient added in v0.8.0

func NewClient(address string, opts ...Opt) (Client, error)

NewClient creates a new client for the Chip Ingress service with optional configuration.

type CloudEvent added in v0.8.0

type CloudEvent = ce.Event

Cloudevents types

func NewEvent

func NewEvent(domain, entity string, payload []byte, attributes map[string]any) (CloudEvent, error)

NewEvent creates a new CloudEvent with the specified domain, entity, payload, and optional attributes.

func ProtoToEvent added in v0.8.0

func ProtoToEvent(eventPb *CloudEventPb) (CloudEvent, error)

type CloudEventBatch added in v0.8.0

type CloudEventBatch = pb.CloudEventBatch

Message types

func EventsToBatch added in v0.8.0

func EventsToBatch(events []CloudEvent) (*CloudEventBatch, error)

type CloudEventPb added in v0.8.0

type CloudEventPb = cepb.CloudEvent

func EventToProto added in v0.8.0

func EventToProto(event CloudEvent) (*CloudEventPb, error)

type EmptyRequest added in v0.8.0

type EmptyRequest = pb.EmptyRequest

type HeaderProvider added in v0.7.1

type HeaderProvider interface {
	GetHeaders() map[string]string
}

HeaderProvider defines an interface for providing headers

type Opt

type Opt func(*clientConfig)

Opt defines a function type for configuring the ChipIngressClient.

func WithBasicAuth added in v0.8.0

func WithBasicAuth(user, pass string) Opt

WithBasicAuth sets the basic-auth credentials for the ChipIngress service. Default is to require TLS for security.

func WithHeaderProvider added in v0.7.1

func WithHeaderProvider(provider HeaderProvider) Opt

WithHeaderProvider sets a dynamic header provider for requests NOTE: for CSA-Key based authentication, use WithTokenAuth instead.

func WithInsecureConnection added in v0.7.1

func WithInsecureConnection() Opt

WithInsecureConnection configures the client to use an insecure connection (no TLS).

func WithTLS added in v0.8.0

func WithTLS() Opt

Add a new option function for TLS with HTTP/2

func WithTokenAuth added in v0.8.0

func WithTokenAuth(tokenProvider HeaderProvider) Opt

WithTokenAuth sets the token-based credentials for the ChipIngress service. Use for CSA-Key based authentication.

func WithTransportCredentials

func WithTransportCredentials(creds credentials.TransportCredentials) Opt

WithTransportCredentials sets the transport custom credentials for the ChipIngress service.

type PingResponse added in v0.8.0

type PingResponse = pb.PingResponse

type PublishResponse added in v0.8.0

type PublishResponse = pb.PublishResponse

type PublishResult added in v0.8.0

type PublishResult = pb.PublishResult

type StreamEventsRequest added in v0.8.0

type StreamEventsRequest = pb.StreamEventsRequest

type StreamEventsResponse added in v0.8.0

type StreamEventsResponse = pb.StreamEventsResponse

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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