external

package
v0.0.0-...-2932577 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound значение не найдено в etcd.
	ErrNotFound = errors.New("key not found")
	// ErrAlreadyExists значение уже записано etcd.
	ErrAlreadyExists = errors.New("key already exists")
)

Functions

func InitExternal

func InitExternal(cfg *config.Config) error

InitExternal инициализирует подключения к внешним ресурсам.

Types

type ETCDClient

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

ETCDClient клиент для работы с etcd.

var ETCD *ETCDClient

ETCD объект синглтон для работы с etcd.

func NewETCDClient

func NewETCDClient(cfg *storage.ETCDConfig) (*ETCDClient, error)

NewETCDClient создает новый etcd клиент.

func (*ETCDClient) LoadAction

func (c *ETCDClient) LoadAction(ctx context.Context, name string) ([]byte, error)

LoadAction получает действие из etcd.

Jump to

Keyboard shortcuts

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