service

package
v0.0.51 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package service manages the main logic of server.

Package service manages the main logic of server.

Package service manages the main logic of server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option added in v0.0.51

type Option func(*client) error

func WithKVPrefix added in v0.0.51

func WithKVPrefix(name string) Option

func WithPrefixDelimiter added in v0.0.51

func WithPrefixDelimiter(del string) Option

func WithRedisClient added in v0.0.51

func WithRedisClient(r redis.Redis) Option

func WithRedisClientConnector added in v0.0.51

func WithRedisClientConnector(connector redis.Connector) Option

func WithVKPrefix added in v0.0.51

func WithVKPrefix(name string) Option

type Redis

type Redis interface {
	Connect(context.Context) error
	Disconnect() error
	Get(context.Context, string) (string, error)
	GetMultiple(context.Context, ...string) ([]string, error)
	GetInverse(context.Context, string) (string, error)
	GetInverseMultiple(context.Context, ...string) ([]string, error)
	Set(context.Context, string, string) error
	SetMultiple(context.Context, map[string]string) error
	Delete(context.Context, string) (string, error)
	DeleteMultiple(context.Context, ...string) ([]string, error)
	DeleteInverse(context.Context, string) (string, error)
	DeleteInverseMultiple(context.Context, ...string) ([]string, error)
}

func New

func New(opts ...Option) (Redis, error)

Jump to

Keyboard shortcuts

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