client

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const NamespaceHeaderKey = "x-namespace"

NamespaceHeaderKey specify what namespace request is targeted for if not provided, default namespace is assumed

Variables

This section is empty.

Functions

func NewRequest added in v0.7.0

func NewRequest[T any](cfg Config, namespaceID string, msg *T) *connect.Request[T]

NewRequest creates a new Connect request with the configured headers.

Types

type Client added in v0.7.0

type Client struct {
	compassv1beta1connect.CompassServiceClient
	// contains filtered or unexported fields
}

Client wraps the Connect client with header configuration

func Create

func Create(ctx context.Context, cfg Config) (*Client, error)

Create creates a new Connect client for the Compass service.

type Config

type Config struct {
	Host                      string `mapstructure:"host" default:"localhost:8080"`
	ServerHeaderKeyUserUUID   string `yaml:"serverheaderkey_uuid" mapstructure:"serverheaderkey_uuid" default:"Compass-User-UUID"`
	ServerHeaderValueUserUUID string `yaml:"serverheadervalue_uuid" mapstructure:"serverheadervalue_uuid" default:"compass@raystack.com"`
}

Jump to

Keyboard shortcuts

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