rd

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: MIT Imports: 5 Imported by: 2

README

rd

Register and Discovery, will support etcd, consul, etc.

feature

  • Easy configuration, service registration and discovery.
  • Support component error message and process information subscription.
  • Configure your service discovery content resolution handler freely.
  • Access or automatically generate component clients based on your configuration.
support plugins
plugin register discover state note
etcd Pre
consul

usage

go get github.com/v8fg/rd

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverClose

func DiscoverClose()

DiscoverClose close all the running discovers.

func DiscoverCloseWithParam

func DiscoverCloseWithParam(name, scheme, service string)

DiscoverCloseWithParam close all the running discovers with the specified name or the combine: scheme and service.

func DiscoverEtcd

func DiscoverEtcd(config *config.DiscoverConfig, client *clientV3.Client, etcdConfig *clientV3.Config) error

DiscoverEtcd etcd discover with some configurations. registry key: name or key, the name preferred.

func DiscoverInfo

func DiscoverInfo() string

DiscoverInfo return the basic info about discover: key and discover addr.

func DiscoverRun

func DiscoverRun() []error

DiscoverRun the registers have been registered.

func DiscoverRunWithParam

func DiscoverRunWithParam(name, scheme, service string) []error

DiscoverRunWithParam run discover have been registered with the specified name or the combine: scheme and service.

func RegisterClose

func RegisterClose() []error

RegisterClose close all the running registers.

func RegisterCloseWithParam

func RegisterCloseWithParam(nameOrKey string) []error

RegisterCloseWithParam close all the running registers with the specified key or name.

func RegisterEtcd

func RegisterEtcd(config *config.RegisterConfig, client *clientV3.Client, etcdConfig *clientV3.Config) error

RegisterEtcd etcd register with some configurations. registry key: name or key, the name preferred.

func RegisterInfo

func RegisterInfo() string

RegisterInfo return the basic info about register: key and register addr.

func RegisterRun

func RegisterRun() []error

RegisterRun the registers have been registered.

func RegisterRunWithParam

func RegisterRunWithParam(nameOrKey string) []error

RegisterRunWithParam run the register have been registered and with the specified name or key.

func RegisterUpdateVal

func RegisterUpdateVal(nameOrKey, val string) error

RegisterUpdateVal update the register val, shall not call, if no necessary. If you want call success, must set MutableVal=true when init the register.

Types

This section is empty.

Directories

Path Synopsis
examples
internal

Jump to

Keyboard shortcuts

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