state

package
v4.90.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: MPL-2.0 Imports: 8 Imported by: 11 modules, 23 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	SetKey(ctx context.Context, key string, value string) error
	GetKey(ctx context.Context, key string) (string, error)
	Flush(ctx context.Context) error
	Close() error
}

func NewClient

func NewClient(ctx context.Context, conn *grpc.ClientConn, tableName string) (Client, error)

func NewClientWithOptions added in v4.37.0

func NewClientWithOptions(ctx context.Context, conn *grpc.ClientConn, tableName string, _ ClientOptions) (Client, error)

func NewConnectedClient added in v4.40.0

func NewConnectedClient(ctx context.Context, backendOpts *plugin.BackendOptions) (Client, error)

NewConnectedClient returns a state client and initialises the gRPC connection to the state backend with a 100MiB max message size. The state client is guaranteed to be non-nil (it defaults to the NoOpClient). You must call Close() on the returned Client object.

func NewConnectedClientWithOptions added in v4.40.0

func NewConnectedClientWithOptions(ctx context.Context, backendOpts *plugin.BackendOptions, connOpts ConnectionOptions, clOpts ClientOptions) (Client, error)

NewConnectedClientWithOptions returns a state client and initialises the gRPC connection to the state backend. The state client is guaranteed to be non-nil (it defaults to the NoOpClient). You must call Close() on the returned Client object.

type ClientOptions added in v4.37.0

type ClientOptions struct{}

type ConnectionOptions added in v4.40.0

type ConnectionOptions struct {
	MaxMsgSizeInBytes int
}

type NoOpClient

type NoOpClient struct{}

func (*NoOpClient) Close added in v4.40.0

func (*NoOpClient) Close() error

func (*NoOpClient) Flush

func (*NoOpClient) Flush(_ context.Context) error

func (*NoOpClient) GetKey

func (*NoOpClient) GetKey(_ context.Context, _ string) (string, error)

func (*NoOpClient) SetKey

func (*NoOpClient) SetKey(_ context.Context, _ string, _ string) error

Jump to

Keyboard shortcuts

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