etcdv3

package
v0.0.0-...-d92af70 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyNewIPRange

func ApplyNewIPRange(network string, subnet *types.IPNet, unit uint32) (net.IP, net.IP, error)

ApplyNewIPRange is used to apply IP range from ectd

func GetFreeIPRange

func GetFreeIPRange(cli *clientv3.Client, keyDir string, subnet *types.IPNet, unit uint32) (uint32, uint32, error)

GetFreeIPRange is used to find a free IP range

Types

type AuthCfg

type AuthCfg struct {
	Client AuthClient `json:"client"`
	Peer   AuthPeer   `json:"peer"`
}

type AuthClient

type AuthClient struct {
	SecureTransport      bool   `json:"secureTransport"`
	EnableAuthentication bool   `json:"enableAuthentication"`
	SecretDirectory      string `json:"secretDirectory"`
}

type AuthPeer

type AuthPeer struct {
	SecureTransport      bool `json:"secureTransport"`
	EnableAuthentication bool `json:"enableAuthentication"`
	UseAutoTLS           bool `json:"useAutoTLS"`
}

type EtcdJSONCfg

type EtcdJSONCfg struct {
	Name      string `json:"name"`
	Endpoints string `json:"endpoints"`
	// Namespace string `json:"namespace"`
	// ClientPort string  `json:"clientPort"`
	// Replicas   int     `json:"replicas`
	Auth AuthCfg `json:"auth"`
}

EtcdJSONCfg is the struct of stored etcd information

Jump to

Keyboard shortcuts

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