client

package
v0.0.55 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DSConnectionStatusNotConnected = "DATASERVER_NOT_CONNECTED"

Variables

This section is empty.

Functions

func GetSchemaServerAddress added in v0.0.55

func GetSchemaServerAddress() string

func NewEphemeral added in v0.0.55

func NewEphemeral(
	ctx context.Context,
	cfg *Config,
) (sdcpb.SchemaServerClient, func() error, error)

NewEphemeral returns a short-lived client and a close function. Call closeFn() when you're done.

func OneShot added in v0.0.55

func OneShot(
	ctx context.Context,
	cfg *Config,
	fn func(ctx context.Context, c sdcpb.SchemaServerClient) error,
) error

OneShot runs a function with a short-lived SchemaServerClient. It dials, runs fn, and always closes the connection.

Types

type Client

type Client interface {
	Start(ctx context.Context) error
	Stop(ctx context.Context)
	GetAddress() string
	IsConnectionReady() bool
	IsConnected() bool
	sdcpb.SchemaServerClient
}

Client is a long-lived SchemaServer client (for controllers, daemons, etc.).

func New

func New(cfg *Config) (Client, error)

type Config

type Config struct {
	Address    string
	Username   string
	Password   string
	Proxy      bool
	NoTLS      bool
	TLSCA      string
	TLSCert    string
	TLSKey     string
	SkipVerify bool
	Insecure   bool
	MaxMsgSize int
}

Jump to

Keyboard shortcuts

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