client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: GPL-3.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitGlobalClientService

func InitGlobalClientService(commonCfg *v1.ClientCommonConfig,
	proxyCfgs []v1.ProxyConfigurer,
	visitorCfgs []v1.VisitorConfigurer)

Types

type Client

type Client struct {
	Common      *v1.ClientCommonConfig
	ProxyCfgs   map[string]v1.ProxyConfigurer
	VisitorCfgs map[string]v1.VisitorConfigurer
	// contains filtered or unexported fields
}

func NewClientHandler

func NewClientHandler(commonCfg *v1.ClientCommonConfig,
	proxyCfgs []v1.ProxyConfigurer,
	visitorCfgs []v1.VisitorConfigurer) *Client

func (*Client) AddProxy

func (c *Client) AddProxy(proxyCfg v1.ProxyConfigurer)

func (*Client) AddVisitor

func (c *Client) AddVisitor(visitorCfg v1.VisitorConfigurer)

func (*Client) GetCommonCfg

func (c *Client) GetCommonCfg() *v1.ClientCommonConfig

func (*Client) GetProxyCfgs

func (c *Client) GetProxyCfgs() map[string]v1.ProxyConfigurer

func (*Client) GetProxyStatus

func (c *Client) GetProxyStatus(name string) (*proxy.WorkingStatus, bool)

func (*Client) GetVisitorCfgs

func (c *Client) GetVisitorCfgs() map[string]v1.VisitorConfigurer

func (*Client) RemoveProxy

func (c *Client) RemoveProxy(proxyCfg v1.ProxyConfigurer)

func (*Client) RemoveVisitor

func (c *Client) RemoveVisitor(visitorCfg v1.VisitorConfigurer)

func (*Client) Run

func (c *Client) Run()

func (*Client) Running

func (c *Client) Running() bool

func (*Client) Stop

func (c *Client) Stop()

func (*Client) Update

func (c *Client) Update(proxyCfgs []v1.ProxyConfigurer, visitorCfgs []v1.VisitorConfigurer)

func (*Client) Wait

func (c *Client) Wait()

type ClientHandler

type ClientHandler interface {
	Run()
	Stop()
	Wait()
	Running() bool
	Update([]v1.ProxyConfigurer, []v1.VisitorConfigurer)
	AddProxy(v1.ProxyConfigurer)
	AddVisitor(v1.VisitorConfigurer)
	RemoveProxy(v1.ProxyConfigurer)
	RemoveVisitor(v1.VisitorConfigurer)
	GetProxyStatus(string) (*proxy.WorkingStatus, bool)
	GetCommonCfg() *v1.ClientCommonConfig
	GetProxyCfgs() map[string]v1.ProxyConfigurer
	GetVisitorCfgs() map[string]v1.VisitorConfigurer
}

func GetGlobalClientSerivce

func GetGlobalClientSerivce() ClientHandler

Jump to

Keyboard shortcuts

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