register

package
v0.0.0-...-35b844d Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 11 Imported by: 0

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) 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