kv

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service to access the project key value store

func NewService

func NewService(conn grpc.ClientConnInterface) *Service

func (*Service) GetLong

func (c *Service) GetLong(ctx context.Context, key string) (int64, error)

GetLong gets an integer value at the given key

func (*Service) GetString

func (c *Service) GetString(ctx context.Context, key string) (string, error)

GetString gets a string value at the given key

func (*Service) Inc

func (c *Service) Inc(ctx context.Context, key string) (int64, error)

Inc increments the given key's value by 1, returning the incremented value

func (*Service) PutLong

func (c *Service) PutLong(ctx context.Context, key string, val int64) error

PutLong sets an integer value at the given key

func (*Service) PutString

func (c *Service) PutString(ctx context.Context, key string, val string) error

PutString sets a string value at the given key

func (*Service) Remove

func (c *Service) Remove(ctx context.Context, key string) error

Remove unsets the value at the given key

Jump to

Keyboard shortcuts

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