Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { HostPort ServerHostPort Weight uint32 }
Server is a single entry in cluster specification
type ServerHostPort ¶
type ServerHostPort string
ServerHostPort is a full host name with port, e.g. "srv1:8123"
type ServersStr ¶
type ServersStr string
ServersStr represent location that accepts logs (e.g. "srv1:8123" or "=srv1*100 =srv2*100 =srv3*100")
type Setting ¶
type Setting struct { Default bool Servers []Server Tables []string // contains filtered or unexported fields }
Setting represents group of settings for specific destination Server
func (*Setting) ChooseNextServer ¶
func (s *Setting) ChooseNextServer() (srv ServerHostPort, ok bool)
ChooseNextServer returns next server from the list or ok=false, which means that there are no available hosts
func (*Setting) TempDisableHost ¶
func (s *Setting) TempDisableHost(srv ServerHostPort, aliveCheck aliveCheckFunc)
TempDisableHost marks provided host as temporarily disabled (it will not be returned in ChooseNextServer()). Provided callback checkCb is used to periodically check that server went live again.
Click to show internal directories.
Click to hide internal directories.