server

package
v0.0.0-...-ee57bd3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InitRpcServerFunc

type InitRpcServerFunc func(s *server.Server) error

type Option

type Option func(*Options)

func Addr

func Addr(s string) Option

func BasePath

func BasePath(s string) Option

func EtcdAddr

func EtcdAddr(a []string) Option

func InitRpcServer

func InitRpcServer(f InitRpcServerFunc) Option

func Name

func Name(s string) Option

func Tracing

func Tracing(b bool) Option

func UpdateInterval

func UpdateInterval(i int) Option

type Options

type Options struct {
	Name          string
	Addr          string
	InitRpcServer InitRpcServerFunc

	// registry
	BasePath       string
	UpdateInterval int
	EtcdAddr       []string

	Tracing bool
}

type Server

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

func NewServer

func NewServer(opts ...Option) *Server

func (*Server) Init

func (s *Server) Init(opts ...Option)

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop() error

Jump to

Keyboard shortcuts

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