Documentation ¶
Index ¶
- Constants
- func GetReqidFromContext(ctx context.Context) string
- func NewReqidContext(ctx context.Context, reqid string) context.Context
- type CloseProxyContent
- type LoginContent
- type Manager
- func (m *Manager) CloseProxy(content *CloseProxyContent) error
- func (m *Manager) Login(content *LoginContent) (*LoginContent, error)
- func (m *Manager) NewProxy(content *NewProxyContent) (*NewProxyContent, error)
- func (m *Manager) NewUserConn(content *NewUserConnContent) (*NewUserConnContent, error)
- func (m *Manager) NewWorkConn(content *NewWorkConnContent) (*NewWorkConnContent, error)
- func (m *Manager) Ping(content *PingContent) (*PingContent, error)
- func (m *Manager) Register(p Plugin)
- type NewProxyContent
- type NewUserConnContent
- type NewWorkConnContent
- type PingContent
- type Plugin
- type Request
- type Response
- type UserInfo
Constants ¶
View Source
const ( APIVersion = "0.1.0" OpLogin = "Login" OpNewProxy = "NewProxy" OpCloseProxy = "CloseProxy" OpPing = "Ping" OpNewWorkConn = "NewWorkConn" OpNewUserConn = "NewUserConn" )
Variables ¶
This section is empty.
Functions ¶
func GetReqidFromContext ¶
Types ¶
type CloseProxyContent ¶
type CloseProxyContent struct { User UserInfo `json:"user"` msg.CloseProxy }
type LoginContent ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager() *Manager
func (*Manager) CloseProxy ¶
func (m *Manager) CloseProxy(content *CloseProxyContent) error
func (*Manager) Login ¶
func (m *Manager) Login(content *LoginContent) (*LoginContent, error)
func (*Manager) NewProxy ¶
func (m *Manager) NewProxy(content *NewProxyContent) (*NewProxyContent, error)
func (*Manager) NewUserConn ¶
func (m *Manager) NewUserConn(content *NewUserConnContent) (*NewUserConnContent, error)
func (*Manager) NewWorkConn ¶
func (m *Manager) NewWorkConn(content *NewWorkConnContent) (*NewWorkConnContent, error)
func (*Manager) Ping ¶
func (m *Manager) Ping(content *PingContent) (*PingContent, error)
type NewProxyContent ¶
type NewUserConnContent ¶
type NewWorkConnContent ¶
type NewWorkConnContent struct { User UserInfo `json:"user"` msg.NewWorkConn }
type PingContent ¶
type Plugin ¶
type Plugin interface { Name() string IsSupport(op string) bool Handle(ctx context.Context, op string, content interface{}) (res *Response, retContent interface{}, err error) }
func NewHTTPPluginOptions ¶
func NewHTTPPluginOptions(options v1.HTTPPluginOptions) Plugin
Click to show internal directories.
Click to hide internal directories.