service

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package service manages the main logic of server.

Package service provides meta service

Package service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Meta

type Meta interface {
	Start(ctx context.Context) (<-chan error, error)
	Exists(context.Context, string) (bool, error)
	GetMeta(context.Context, string) (string, error)
	GetMetas(context.Context, ...string) ([]string, error)
	GetUUID(context.Context, string) (string, error)
	GetUUIDs(context.Context, ...string) ([]string, error)
	SetUUIDandMeta(context.Context, string, string) error
	SetUUIDandMetas(context.Context, map[string]string) error
	DeleteMeta(context.Context, string) (string, error)
	DeleteMetas(context.Context, ...string) ([]string, error)
	DeleteUUID(context.Context, string) (string, error)
	DeleteUUIDs(context.Context, ...string) ([]string, error)
	GRPCClient() grpc.Client
}

func New

func New(opts ...Option) (mi Meta, err error)

type Option

type Option func(m *meta) error

func WithMetaCache

func WithMetaCache(c cache.Cache) Option

func WithMetaCacheEnabled

func WithMetaCacheEnabled(flg bool) Option

func WithMetaCacheExpireDuration

func WithMetaCacheExpireDuration(dur string) Option

func WithMetaCacheExpiredCheckDuration

func WithMetaCacheExpiredCheckDuration(dur string) Option

func WithMetaClient

func WithMetaClient(client grpc.Client) Option

Jump to

Keyboard shortcuts

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