etcd

package
v2.3.2-rc.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Module

func Module() fx.Option

Module is a fx module that provides etcd client.

Types

type Client

type Client struct {
	KV      clientv3.KV
	Watcher clientv3.Watcher
	Lease   clientv3.Lease
	Client  *clientv3.Client
	Session *concurrencyv3.Session
	LeaseID clientv3.LeaseID
}

Client is a wrapper around etcd client v3. It provides interfaces rooted by a namespace in etcd.

func ProvideClient

func ProvideClient(in ClientIn) (*Client, error)

ProvideClient creates a new Etcd Client and provides it via Fx.

type ClientIn

type ClientIn struct {
	fx.In

	Unmarshaller config.Unmarshaller
	Lifecycle    fx.Lifecycle
	Shutdowner   fx.Shutdowner
	Logger       *log.Logger
}

ClientIn holds parameters for ProvideClient.

Jump to

Keyboard shortcuts

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