server

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BroadcastProxy

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

func NewBroadcastProxy

func NewBroadcastProxy(backend []string, probePath string, maxIdleConns int, probeSample int) (*BroadcastProxy, error)

func (*BroadcastProxy) Close

func (proxy *BroadcastProxy) Close()

func (*BroadcastProxy) HandleRequest

func (proxy *BroadcastProxy) HandleRequest(w http.ResponseWriter, r *http.Request)

func (*BroadcastProxy) RequestAllBackend

func (proxy *BroadcastProxy) RequestAllBackend(method, uri string, requestBody []byte) ([]string, []error)

type BroadcastService

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

func NewBroadcastService

func NewBroadcastService(addr string, proxy *BroadcastProxy, dispatch *CometDispatcher) (*BroadcastService, error)

func (*BroadcastService) Close

func (service *BroadcastService) Close()

func (*BroadcastService) Dispatch

func (service *BroadcastService) Dispatch(w http.ResponseWriter, r *http.Request)

func (*BroadcastService) Ping

func (service *BroadcastService) Ping(w http.ResponseWriter, r *http.Request)

func (*BroadcastService) Proxy

func (service *BroadcastService) Proxy(w http.ResponseWriter, r *http.Request)

func (*BroadcastService) SetAngryValue

func (service *BroadcastService) SetAngryValue(w http.ResponseWriter, r *http.Request)

func (*BroadcastService) SetAngryValueV2

func (service *BroadcastService) SetAngryValueV2(w http.ResponseWriter, r *http.Request)

type CometDispatcher

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

func NewCometDispatcher

func NewCometDispatcher(ipipConfig *conf.IpipConfig,
	dispatchConfig *conf.DispatchConfig, svenConfig *conf.SvenConfig) (*CometDispatcher, error)

func (*CometDispatcher) Close

func (dispatcher *CometDispatcher) Close()

func (*CometDispatcher) Dispatch

func (dispatcher *CometDispatcher) Dispatch(ip string, uid int64) ([]string, []string)

type ZkClient

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

func NewZkClient

func NewZkClient(addrs []string, timeout time.Duration) (*ZkClient, error)

func (*ZkClient) Close

func (c *ZkClient) Close()

func (*ZkClient) CreateEphemeralNode

func (c *ZkClient) CreateEphemeralNode(path string, node string, data []byte) (string, error)

func (*ZkClient) CreatePersistNode

func (c *ZkClient) CreatePersistNode(path string, node string, data []byte) (string, error)

func (*ZkClient) DeleteNode

func (c *ZkClient) DeleteNode(path string, node string) error

func (*ZkClient) Exists

func (c *ZkClient) Exists(path string, node string) (bool, int32, error)

func (*ZkClient) GetChildren

func (c *ZkClient) GetChildren(node string) ([]string, error)

func (*ZkClient) GetChildrenWithData

func (c *ZkClient) GetChildrenWithData(node string) (map[string]string, error)

func (*ZkClient) GetData

func (c *ZkClient) GetData(path string) (string, error)

func (*ZkClient) GetNodeData

func (c *ZkClient) GetNodeData(path string, node string) ([]byte, int32, error)

func (*ZkClient) GetTimeout

func (c *ZkClient) GetTimeout() time.Duration

func (*ZkClient) RecursiveCreate

func (c *ZkClient) RecursiveCreate(path string) error

func (*ZkClient) Reset

func (c *ZkClient) Reset() error

func (*ZkClient) SetNodeData

func (c *ZkClient) SetNodeData(path string, node string, data []byte, version int32) error

func (*ZkClient) WatchChildren

func (c *ZkClient) WatchChildren(path string) (map[string]struct{}, <-chan zk.Event, error)

func (*ZkClient) WatchChildrenWithData

func (c *ZkClient) WatchChildrenWithData(node string) (map[string]string, <-chan zk.Event, error)

func (*ZkClient) WatchData

func (c *ZkClient) WatchData(path string) ([]byte, <-chan zk.Event, error)

func (*ZkClient) ZooKeeperPath

func (c *ZkClient) ZooKeeperPath(args ...string) string

Jump to

Keyboard shortcuts

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