packageapi

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...Option) (*application, error)

New creates new instance of Application

Types

type Option added in v1.5.0

type Option func(*application) error

Option serves as the client configuration

func WithConfig added in v1.5.0

func WithConfig(cfg *viper.Viper) Option

WithConfig provides viper config to the client

func WithStorage added in v1.5.0

func WithStorage(storage Storage) Option

WithStorage provides Storage to the client

type Storage added in v1.5.0

type Storage interface {
	Close(delete bool) error
	Keys() ([]string, error)
	Get(key string) ([]byte, error)
	GetMultipleBySuffix(suffix string) ([]string, [][]byte, error)
	Put(key string, val []byte) error
	Delete(key string) error
	Purge() error
}

Storage describes the storage

Jump to

Keyboard shortcuts

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