Help us shape the future of Go! Take the 2026 Go Developer Survey

client

package
v0.0.38 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2025 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, ccfg *ClientConfig) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) InstanceCreate added in v0.0.37

func (c *Client) InstanceCreate(ctx context.Context, name string, opts ...grpc.CallOption) error

InstanceCreate Create the an instance with the given name

func (*Client) InstanceDelete added in v0.0.37

func (c *Client) InstanceDelete(ctx context.Context, name string, opts ...grpc.CallOption) error

InstanceDelete Delete the given Cache instance

func (*Client) InstanceIntentDelete added in v0.0.37

func (c *Client) InstanceIntentDelete(ctx context.Context, cacheInstanceName string, intentName string, opts ...grpc.CallOption) error

InstanceIntentDelete Delete the specified intent of the given cache instance

func (*Client) InstanceIntentExists added in v0.0.37

func (c *Client) InstanceIntentExists(ctx context.Context, cacheInstanceName string, intentName string, opts ...grpc.CallOption) (bool, error)

InstanceIntentExists Check for the existance of the specified intent as part of the given cache instance

func (*Client) InstanceIntentGet added in v0.0.37

func (c *Client) InstanceIntentGet(ctx context.Context, cacheInstanceName string, intentName string, opts ...grpc.CallOption) (*Intent, error)

InstanceIntentGet Get the specified intent of the given cache instance

func (*Client) InstanceIntentModify added in v0.0.37

func (c *Client) InstanceIntentModify(ctx context.Context, cacheInstanceName string, intentName string, intentData []byte, opts ...grpc.CallOption) error

InstanceIntentModify Create or modify the intent for the given instance

func (*Client) InstanceIntentsGetAll added in v0.0.37

func (c *Client) InstanceIntentsGetAll(ctx context.Context, cacheInstanceName string, excludeIntents []string, opts ...grpc.CallOption) ([]*Intent, error)

func (*Client) InstanceIntentsGetAllChan added in v0.0.37

func (c *Client) InstanceIntentsGetAllChan(ctx context.Context, cacheInstanceName string, excludeIntents []string, opts ...grpc.CallOption) (<-chan *Intent, <-chan error, error)

InstanceIntentsGetAllChan Get all intents of the given cache instance. Allows to specify specific intents via name that should be excluded by the server.

func (*Client) InstanceIntentsList added in v0.0.37

func (c *Client) InstanceIntentsList(ctx context.Context, cacheInstanceName string, opts ...grpc.CallOption) ([]string, error)

InstanceIntentsList List all the intents for the given cache instance

func (*Client) InstancesList added in v0.0.37

func (c *Client) InstancesList(ctx context.Context, opts ...grpc.CallOption) ([]string, error)

InstancesList List all cache instances

type ClientConfig

type ClientConfig struct {
	// the cache server address
	Address string
	// number of read streams that can be opened concurrently
	// defaults to 1
	MaxReadStream int64
	// number of read streams that can be opened concurrently
	// defaults to 64
	MaxWatchStream int64
	// gRPC dial and unary RPCs timeout
	// defaults to 5s
	Timeout time.Duration
}

type ClientOpts

type ClientOpts struct {
	Owner string
}

type Intent added in v0.0.37

type Intent struct {
	// contains filtered or unexported fields
}

func NewIntent added in v0.0.37

func NewIntent(name string, data []byte) *Intent

func (*Intent) Data added in v0.0.37

func (i *Intent) Data() []byte

func (*Intent) Name added in v0.0.37

func (i *Intent) Name() string

func (*Intent) String added in v0.0.37

func (i *Intent) String() string

Jump to

Keyboard shortcuts

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