register

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFromFile

func RegisterFromFile(configPath string, client *RegisterClient) error

Types

type Reg

type Reg struct {
	Id        string `json:"id"`
	Namespace string `json:"namespace"`
	Version   string `json:"version"`
	Ref       string `json:"ref"`
}

type RegisterClient

type RegisterClient struct {
	Client    *clientv3.Client
	Endpoints []string
}

func (*RegisterClient) Init

func (c *RegisterClient) Init() error

type RegisterConfig

type RegisterConfig struct {
	Enable    bool     `json:"enable"`
	Endpoints []string `json:"endpoints"`
	RegPath   string   `json:"config"`
}

type RegisterPlugin

type RegisterPlugin struct {
	Config *RegisterConfig
	// contains filtered or unexported fields
}

func (*RegisterPlugin) GetPluginConfig

func (p *RegisterPlugin) GetPluginConfig() map[string]interface{}

func (*RegisterPlugin) OnInit

func (*RegisterPlugin) SetConfig

func (p *RegisterPlugin) SetConfig(config RegisterConfig)

type Service

type Service struct {
	Id string

	Namespace string `mapstructure:"namespace"`
	Version   string `mapstructure:"version"`
	Ref       string `mapstructure:"ref"`
	// contains filtered or unexported fields
}

func (*Service) Init

func (s *Service) Init(client *RegisterClient) error

func (*Service) Register

func (s *Service) Register() error

func (*Service) UnRegister

func (s *Service) UnRegister() error

Jump to

Keyboard shortcuts

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