server

package
v0.0.0-...-c463dc4 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultGrpcServer = NewGrpcServer()

Functions

This section is empty.

Types

type Client

type Client struct {
	Services []config.ServiceEnv
	// contains filtered or unexported fields
}

func GetClient

func GetClient(etcd EtcdManager, config *config.Config) *Client

type Conf

type Conf struct {
	Addr     string
	Metadata Metadata
}

type EtcdConfig

type EtcdConfig struct {
	EndPoints         []string
	Timeout           int
	Port              string
	ServiceNamePrefix string
	Version           string
}

type EtcdManager

type EtcdManager interface {
	Register(key string, addrs ...string)
	UnRegister(key string)
	// contains filtered or unexported methods
}

func NewEtcd

func NewEtcd(config *EtcdConfig) EtcdManager

type Metadata

type Metadata struct {
	Version string
}

type Mux

type Mux interface {
	GrpcNetListener() net.Listener
	HttpNetListener() net.Listener
	Serve() error
}

func GetMux

func GetMux(port string) Mux

type Server

type Server interface {
	GrpcServer() *grpc.Server
}

func NewGrpcServer

func NewGrpcServer() Server

Jump to

Keyboard shortcuts

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