etcdv3

package module
v0.0.0-...-3c16d7b Latest Latest
Warning

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

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

Documentation

Overview

This package provides etcd v3 dynamic data-source implementation for Sentinel.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Example_ClientWithMultiDatasource

func Example_ClientWithMultiDatasource()

New multi datasource based on etcv3 client

func Example_ClientWithOneDatasource

func Example_ClientWithOneDatasource()

New one datasource based on etcv3 client

Types

type Etcdv3DataSource

type Etcdv3DataSource struct {
	datasource.Base
	// contains filtered or unexported fields
}

func NewDataSource

func NewDataSource(client *clientv3.Client, key string, handlers ...datasource.PropertyHandler) (*Etcdv3DataSource, error)

NewDataSource new a Etcdv3DataSource instance. client is the etcdv3 client, it must be useful and should be release by User.

func (*Etcdv3DataSource) Close

func (s *Etcdv3DataSource) Close() error

func (*Etcdv3DataSource) Initialize

func (s *Etcdv3DataSource) Initialize() error

func (*Etcdv3DataSource) ReadSource

func (s *Etcdv3DataSource) ReadSource() ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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