registry

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CMDOptions

type CMDOptions struct {
	Feature bool   `json:"etcd_feature" value:"false" usage:"switch that turn on etcd registry feature"`
	Address string `json:"etcd_address" value:"127.0.0.1:2379" usage:"etcd registry feature, multiple ip addresses splited by comma"`
	CA      string `json:"etcd_ca" value:"" usage:"etcd registry CA"`
	Cert    string `json:"etcd_cert" value:"" usage:"etcd registry tls cert file"`
	Key     string `json:"etcd_key" value:"" usage:"etcd registry tls key file"`
}

CMDOptions config item for etcd discovery

func (*CMDOptions) GetTLSConfig

func (co *CMDOptions) GetTLSConfig() (*tls.Config, error)

GetTLSConfig get tls config from configuration

type Options

type Options struct {

	//Registry address, formation like ip:port
	RegistryAddr []string
	//register name, like $module.bkbcs.tencent.com
	Name string
	//bkbcs version information
	Version string
	//Meta info for go-micro registry
	Meta map[string]string
	//Address information for other module discovery
	// format likes ip:port
	RegAddr  string
	Config   *tls.Config
	TTL      time.Duration
	Interval time.Duration
	// contains filtered or unexported fields
}

Options registry options

type Registry

type Registry interface {
	//Register service information to registry
	// register do not block, if module want to
	// clean registe information, call Deregister
	Register() error
	//Deregister clean service information from registry
	Deregister() error
}

Registry interface for go-micro etcd discovery

func NewEtcdRegistry

func NewEtcdRegistry(option *Options) Registry

NewEtcdRegistry create etcd registry instance

Jump to

Keyboard shortcuts

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