Documentation ¶
Index ¶
- Constants
- func GetHostname() (string, error)
- type Http
- type HttpOptions
- type HttpServer
- func (s *HttpServer) DiscoveryRegister(key, value interface{}) bool
- func (s *HttpServer) GetEvent() <-chan int
- func (s *HttpServer) Register(m any)
- func (s *HttpServer) RegisterWithName(m any, name string)
- func (s *HttpServer) SetAfterFunc(afterFunc func(id any, method string, result any) error)
- func (s *HttpServer) SetBeforeFunc(beforeFunc func(id any, method string, params any) error)
- func (s *HttpServer) SetDiscovery(d discovery.Driver, hostname string)
- func (s *HttpServer) SetOptions(httpOptions any)
- func (s *HttpServer) SetRateLimit(r rate.Limit, b int)
- func (s *HttpServer) Start() error
- type Protocol
- type Server
- type Tcp
- type TcpOptions
- type TcpServer
- func (s *TcpServer) DiscoveryRegister(key, value interface{}) bool
- func (s *TcpServer) GetEvent() <-chan int
- func (s *TcpServer) Register(m any)
- func (s *TcpServer) RegisterWithName(m any, name string)
- func (s *TcpServer) SetAfterFunc(afterFunc func(id any, method string, result any) error)
- func (s *TcpServer) SetBeforeFunc(beforeFunc func(id any, method string, params any) error)
- func (s *TcpServer) SetDiscovery(d discovery.Driver, hostname string)
- func (s *TcpServer) SetOptions(tcpOptions any)
- func (s *TcpServer) SetRateLimit(r rate.Limit, b int)
- func (s *TcpServer) Start() error
Constants ¶
View Source
const REGISTRY_RETRY_INTERVAL = 3000
Variables ¶
This section is empty.
Functions ¶
func GetHostname ¶
Types ¶
type HttpOptions ¶
type HttpOptions struct { }
type HttpServer ¶
type HttpServer struct { Hostname string Port int Server common.Server Options HttpOptions Event chan int Discovery discovery.Driver }
func (*HttpServer) DiscoveryRegister ¶
func (s *HttpServer) DiscoveryRegister(key, value interface{}) bool
func (*HttpServer) GetEvent ¶
func (s *HttpServer) GetEvent() <-chan int
func (*HttpServer) Register ¶
func (s *HttpServer) Register(m any)
func (*HttpServer) RegisterWithName ¶ added in v0.0.5
func (s *HttpServer) RegisterWithName(m any, name string)
func (*HttpServer) SetAfterFunc ¶
func (s *HttpServer) SetAfterFunc(afterFunc func(id any, method string, result any) error)
func (*HttpServer) SetBeforeFunc ¶
func (s *HttpServer) SetBeforeFunc(beforeFunc func(id any, method string, params any) error)
func (*HttpServer) SetDiscovery ¶
func (s *HttpServer) SetDiscovery(d discovery.Driver, hostname string)
func (*HttpServer) SetOptions ¶
func (s *HttpServer) SetOptions(httpOptions any)
func (*HttpServer) SetRateLimit ¶
func (s *HttpServer) SetRateLimit(r rate.Limit, b int)
func (*HttpServer) Start ¶
func (s *HttpServer) Start() error
type Server ¶
type Server interface { SetBeforeFunc(func(id any, method string, params any) error) SetAfterFunc(func(id any, method string, result any) error) SetOptions(any) SetDiscovery(d discovery.Driver, hostname string) SetRateLimit(rate.Limit, int) Start() error Register(s any) RegisterWithName(s any, name string) DiscoveryRegister(key, value interface{}) bool GetEvent() <-chan int }
type TcpOptions ¶
type TcpServer ¶
type TcpServer struct { Hostname string Port int Server common.Server Options TcpOptions Event chan int Discovery discovery.Driver }
func (*TcpServer) DiscoveryRegister ¶
func (*TcpServer) RegisterWithName ¶ added in v0.0.5
func (*TcpServer) SetAfterFunc ¶
func (*TcpServer) SetBeforeFunc ¶
func (*TcpServer) SetDiscovery ¶
func (*TcpServer) SetOptions ¶
Click to show internal directories.
Click to hide internal directories.