Documentation ¶
Index ¶
- Constants
- Variables
- type AddNodeParams
- type AddUsersParams
- type Core
- type DelUsersParams
- type GetUserTrafficParams
- type GetUserTrafficResponse
- type NodeInfo
- type Plugin
- type PluginClient
- type PluginImplClient
- func (c *PluginImplClient) AddNode(params *AddNodeParams) (err error)
- func (c *PluginImplClient) AddUsers(p *AddUsersParams) (err error)
- func (c *PluginImplClient) Close() (err error)
- func (c *PluginImplClient) DelNode(name string) (err error)
- func (c *PluginImplClient) DelUsers(params *DelUsersParams) (err error)
- func (c *PluginImplClient) GetUserTraffic(p *GetUserTrafficParams) (rsp *GetUserTrafficResponse)
- func (c *PluginImplClient) Protocols() (ps []string)
- func (c *PluginImplClient) ResetUserTraffic(p *ResetUserTrafficParams) (err error)
- func (c *PluginImplClient) Start(dataPath string, config []byte) (err error)
- func (c *PluginImplClient) Type() (t string)
- type PluginImplServer
- func (s *PluginImplServer) AddNode(params *AddNodeParams, err *error) error
- func (s *PluginImplServer) AddUsers(params *AddUsersParams, err *error) error
- func (s *PluginImplServer) Close(_ interface{}, err *error) error
- func (s *PluginImplServer) DelNode(name string, err *error) error
- func (s *PluginImplServer) DelUsers(params *DelUsersParams, err *error) error
- func (s *PluginImplServer) GetUserTraffic(params *GetUserTrafficParams, rsp *GetUserTrafficResponse) error
- func (s *PluginImplServer) Protocols(_ interface{}, rsp *[]string) error
- func (s *PluginImplServer) ResetUserTraffic(p *ResetUserTrafficParams, err *error) error
- func (s *PluginImplServer) Start(p *StartParams, err *error) error
- func (s *PluginImplServer) Type(_ interface{}, t *string) error
- type PluginServer
- type ResetUserTrafficParams
- type StartParams
- type TlsOptions
- type UserInfo
Constants ¶
View Source
const PluginName = "ratte-core"
Variables ¶
View Source
var HandshakeConfig = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "is-ratte-core",
MagicCookieValue: "true",
}
Functions ¶
This section is empty.
Types ¶
type AddNodeParams ¶
type AddNodeParams struct { Name string NodeInfo *NodeInfo TlsOptions TlsOptions ExpandOptions []byte }
type AddUsersParams ¶
type AddUsersParams struct { NodeName string Users []UserInfo params2.ExpandParams }
type Core ¶
type Core interface { Start(dataPath string, config []byte) error Close() error AddNode(params *AddNodeParams) error DelNode(name string) error AddUsers(p *AddUsersParams) error GetUserTraffic(p *GetUserTrafficParams) *GetUserTrafficResponse ResetUserTraffic(p *ResetUserTrafficParams) error DelUsers(params *DelUsersParams) error Protocols() []string Type() string }
type DelUsersParams ¶
type GetUserTrafficParams ¶
type GetUserTrafficResponse ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
type PluginClient ¶
type PluginClient struct { Core *baseplugin.Client }
func (*PluginClient) Close ¶
func (c *PluginClient) Close() error
type PluginImplClient ¶
type PluginImplClient struct {
// contains filtered or unexported fields
}
func (*PluginImplClient) AddNode ¶
func (c *PluginImplClient) AddNode(params *AddNodeParams) (err error)
func (*PluginImplClient) AddUsers ¶
func (c *PluginImplClient) AddUsers(p *AddUsersParams) (err error)
func (*PluginImplClient) Close ¶
func (c *PluginImplClient) Close() (err error)
func (*PluginImplClient) DelNode ¶
func (c *PluginImplClient) DelNode(name string) (err error)
func (*PluginImplClient) DelUsers ¶
func (c *PluginImplClient) DelUsers(params *DelUsersParams) (err error)
func (*PluginImplClient) GetUserTraffic ¶
func (c *PluginImplClient) GetUserTraffic(p *GetUserTrafficParams) (rsp *GetUserTrafficResponse)
func (*PluginImplClient) Protocols ¶
func (c *PluginImplClient) Protocols() (ps []string)
func (*PluginImplClient) ResetUserTraffic ¶
func (c *PluginImplClient) ResetUserTraffic(p *ResetUserTrafficParams) (err error)
func (*PluginImplClient) Start ¶
func (c *PluginImplClient) Start(dataPath string, config []byte) (err error)
func (*PluginImplClient) Type ¶
func (c *PluginImplClient) Type() (t string)
type PluginImplServer ¶
type PluginImplServer struct {
// contains filtered or unexported fields
}
func (*PluginImplServer) AddNode ¶
func (s *PluginImplServer) AddNode(params *AddNodeParams, err *error) error
func (*PluginImplServer) AddUsers ¶
func (s *PluginImplServer) AddUsers(params *AddUsersParams, err *error) error
func (*PluginImplServer) Close ¶
func (s *PluginImplServer) Close(_ interface{}, err *error) error
func (*PluginImplServer) DelNode ¶
func (s *PluginImplServer) DelNode(name string, err *error) error
func (*PluginImplServer) DelUsers ¶
func (s *PluginImplServer) DelUsers(params *DelUsersParams, err *error) error
func (*PluginImplServer) GetUserTraffic ¶
func (s *PluginImplServer) GetUserTraffic(params *GetUserTrafficParams, rsp *GetUserTrafficResponse) error
func (*PluginImplServer) Protocols ¶
func (s *PluginImplServer) Protocols(_ interface{}, rsp *[]string) error
func (*PluginImplServer) ResetUserTraffic ¶
func (s *PluginImplServer) ResetUserTraffic(p *ResetUserTrafficParams, err *error) error
func (*PluginImplServer) Start ¶
func (s *PluginImplServer) Start(p *StartParams, err *error) error
func (*PluginImplServer) Type ¶
func (s *PluginImplServer) Type(_ interface{}, t *string) error
type PluginServer ¶
type PluginServer struct {
*baseplugin.Server
}
func NewServer ¶
func NewServer(l hclog.Logger, c Core) (*PluginServer, error)
type ResetUserTrafficParams ¶
type StartParams ¶
type TlsOptions ¶
Click to show internal directories.
Click to hide internal directories.