sd

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEtcdClientConn

func NewEtcdClientConn(address string, port int, serviceName string, timeout int) (*grpc.ClientConn, error)

NewEtcdClientConn new etcd client connection

Types

type ServiceMesh

type ServiceMesh interface {
	GetClient() interface{}
	RegService(projectName string, projectVersion string, serviceIP string, servicePort int, Tags []string, timeout int) error
	DeRegService(projectName string, projectVersion string, serviceIP string, servicePort int, timeout int) error
}

ServiceMesh interface

func NewEtcdRegister

func NewEtcdRegister(address string, port int) (ServiceMesh, error)

NewEtcdRegister New consul register

type ServiceMeshEtcdImpl

type ServiceMeshEtcdImpl struct {
	// config
	Address string // consul address
	Port    int
	// contains filtered or unexported fields
}

ServiceMeshEtcdImpl consul register

func (*ServiceMeshEtcdImpl) DeRegService

func (s *ServiceMeshEtcdImpl) DeRegService(projectName string, projectVersion string, serviceIP string, servicePort int, timeout int) error

DeRegService deregister service

func (*ServiceMeshEtcdImpl) GetClient

func (s *ServiceMeshEtcdImpl) GetClient() interface{}

GetClient get etcd client

func (*ServiceMeshEtcdImpl) RegService

func (s *ServiceMeshEtcdImpl) RegService(projectName string, projectVersion string, serviceIP string, servicePort int, Tags []string, timeout int) error

RegService register etcd service

Jump to

Keyboard shortcuts

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