server

package
v0.0.0-...-6371da9 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsulRegisterConfig

type ConsulRegisterConfig struct {
	ConsulAddress string
	ServerID      string
	Name          string
	ServicePort   int
	ServiceIP     string
	EnableCheck   bool
}

ConsulRegisterConfig unregister service from consul

type ConsulResult

type ConsulResult struct {
	Agent    *api.Agent
	ServerID string
}

func NewConsulResult

func NewConsulResult(agent *api.Agent, serverID string) *ConsulResult

func RegisterToConsul

func RegisterToConsul(registerConfig *ConsulRegisterConfig) (*ConsulResult, error)

RegistToConsul register service to consul

func (*ConsulResult) ShutdownAgent

func (c *ConsulResult) ShutdownAgent() error

type SimpleConsulServer

type SimpleConsulServer struct {
	// contains filtered or unexported fields
}

func (*SimpleConsulServer) BaseInit

func (s *SimpleConsulServer) BaseInit(cfg *ConsulRegisterConfig, grpcServer *grpc.Server) error

func (*SimpleConsulServer) BaseShutdown

func (s *SimpleConsulServer) BaseShutdown() error

Jump to

Keyboard shortcuts

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