Documentation ¶
Index ¶
- Constants
- Variables
- func Int64Log2(x uint64) int
- type Config
- func (c *Config) CacheTimeout() time.Duration
- func (c *Config) Current() *config.Main
- func (c *Config) GetFQDN(host string) string
- func (c *Config) Load(cfg *config.Main) error
- func (c *Config) MuxConfig(tag string) *yamux.Config
- func (c *Config) SetConnParams(conn net.Conn)
- func (c *Config) TLSConfig(sni string) *tls.Config
- func (c *Config) Timeout() time.Duration
- func (c *Config) Timestamp() int64
- type RPC
- type Resolver
- type Router
- func (r *Router) CollectMetrics(w *bufio.Writer)
- func (r *Router) DialContext(ctx context.Context, network, addr string) (net.Conn, error)
- func (r *Router) Proxy(req *http.Request) (*url.URL, error)
- func (r *Router) Resolve(host string) (*url.URL, error)
- func (r *Router) Routes() map[string]string
- func (r *Router) UpdateProxy(destination string)
- type Server
- func (s *Server) BootstrapFromConfig()
- func (s *Server) Broadcast(ctx context.Context, method, except string, mayDial bool, args interface{}, ...) <-chan rpcResult
- func (s *Server) ClusterInfo() *proto.Cluster
- func (s *Server) CollectMetrics(w *bufio.Writer)
- func (s *Server) DialPeerContext(ctx context.Context, peer string) (net.Conn, error)
- func (s *Server) FindProxy(peer string, tryDirect, fast bool) (string, error)
- func (s *Server) LocalPeerName() string
- func (s *Server) MergeCluster(cluster *proto.Cluster) bool
- func (s *Server) OnPeerLost(p *peer)
- func (s *Server) Serve(l net.Listener)
- func (s *Server) Shutdown(ctx context.Context) error
- func (s *Server) Start() error
Constants ¶
View Source
const ( PathStatus = "/status" PathCluster = "/cluster" PathRPC = "/v1/rpc" )
Variables ¶
View Source
var ErrUnsupportedTransferEncoding = errors.New("unsupported transfer encoding")
Functions ¶
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) CacheTimeout ¶
func (*Config) SetConnParams ¶
type Router ¶
func (*Router) CollectMetrics ¶
func (*Router) DialContext ¶
func (*Router) UpdateProxy ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) BootstrapFromConfig ¶
func (s *Server) BootstrapFromConfig()
func (*Server) ClusterInfo ¶
func (*Server) CollectMetrics ¶
func (*Server) DialPeerContext ¶
func (*Server) LocalPeerName ¶
func (*Server) OnPeerLost ¶
func (s *Server) OnPeerLost(p *peer)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.