rpcclient

package
v1.16.109 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheGetter

type CacheGetter interface {
	Get(ctx context.Context, t string, r cache.Request) (interface{}, cache.ResultMeta, error)
	NotifyCallback(ctx context.Context, t string, r cache.Request, cID string, cb cache.Callback) error
}

CacheGetter represents an interface for interacting with the cache

type Client

type Client struct {
	NetRPC              NetRPC
	Cache               CacheGetter
	ViewStore           MaterializedViewStore
	MaterializerDeps    MaterializerDeps
	CacheName           string
	UseStreamingBackend bool
	QueryOptionDefaults func(options *structs.QueryOptions)
}

Client represents a rpc client, a new Client is created in each sub-package embedding this object. Methods are therefore implemented in the subpackages as well.

func (*Client) Close

func (c *Client) Close() error

Close any underlying connections used by the client.

type MaterializedViewStore

type MaterializedViewStore interface {
	Get(ctx context.Context, req submatview.Request) (submatview.Result, error)
	NotifyCallback(ctx context.Context, req submatview.Request, cID string, cb cache.Callback) error
}

MaterializedViewStore represents an interface for interacting with the material view store

type MaterializerDeps

type MaterializerDeps struct {
	Conn   *grpc.ClientConn
	Logger hclog.Logger
}

MaterializerDeps include the dependencies for the materializer

type NetRPC

type NetRPC interface {
	RPC(ctx context.Context, method string, args interface{}, reply interface{}) error
}

NetRPC reprents an interface for making RPC requests

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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