Documentation
¶
Index ¶
- type Client
- func NewClient(ctx context.Context, conn *grpc.ClientConn, tableName string) (Client, error)
- func NewClientWithOptions(ctx context.Context, conn *grpc.ClientConn, tableName string, ...) (Client, error)
- func NewConnectedClient(ctx context.Context, backendOpts *plugin.BackendOptions) (Client, error)
- func NewConnectedClientWithOptions(ctx context.Context, backendOpts *plugin.BackendOptions, ...) (Client, error)
- type ClientOptions
- type ConnectionOptions
- type NoOpClient
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 NewClientWithOptions ¶
func NewClientWithOptions(ctx context.Context, conn *grpc.ClientConn, tableName string, opts ClientOptions) (Client, error)
func NewConnectedClient ¶
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 ¶
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 ¶
type ClientOptions struct {
Versioned bool
}
type ConnectionOptions ¶
type ConnectionOptions struct {
MaxMsgSizeInBytes int
}
type NoOpClient ¶
type NoOpClient struct{}
func (*NoOpClient) Close ¶
func (*NoOpClient) Close() error
Click to show internal directories.
Click to hide internal directories.