client

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CtxTimeout specifies the number of seconds to wait until operation terminates.
	CtxTimeout time.Duration = time.Second * 10
	// ValueNone is a special value for values that do not exist.
	ValueNone string = "(None)"
)

Variables

View Source
var (
	GrpcDatabaseClient kvdbserver.DatabaseServiceClient
	GrpcStorageClient  kvdbserver.StorageServiceClient
	GrpcServerClient   kvdbserver.ServerServiceClient
)

Functions

func CheckGrpcError

func CheckGrpcError(err error)

CheckGrpcError checks if error is a gRPC error. Prints error with the gRPC status message if it is. Otherwise prints the error if it is not nil.

func CloseConnections

func CloseConnections()

CloseConnections closes all connections to the server.

func GetBaseGrpcMetadata added in v0.2.0

func GetBaseGrpcMetadata() metadata.MD

GetBaseGrpcMetadata returns base gRPC metadata for all requests. It can be overwritten or extended.

func InitClient

func InitClient()

InitClient initializes the client and connections.

func ReadPasswordFromEnv added in v0.2.0

func ReadPasswordFromEnv() (string, bool)

ReadPasswordFromEnv reads password from environment variable. The returned bool is true if it is present.

Types

This section is empty.

Jump to

Keyboard shortcuts

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