Documentation
¶
Overview ¶
Package ssm implements the Shadowsocks Server Management API v1.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶ added in v1.14.0
type Server struct {
// CredentialManager manages user credentials for the server.
// It is nil if the server does not support user management.
CredentialManager *cred.ManagedServer
// StatsCollector provides access to server traffic statistics.
// It MUST NOT be nil.
StatsCollector stats.Collector
}
Server represents a server managed by the API.
type ServerManager ¶
type ServerManager struct {
// contains filtered or unexported fields
}
ServerManager handles server management API requests.
func NewServerManager ¶
func NewServerManager(serverByName map[string]Server, serverNames []string) *ServerManager
NewServerManager returns a new server manager.
func (*ServerManager) RegisterHandlers ¶ added in v1.13.0
func (sm *ServerManager) RegisterHandlers(register func(method string, path string, handler restapi.HandlerFunc))
RegisterHandlers sets up handlers for the /servers endpoint.
type StandardError ¶
type StandardError struct {
Message string `json:"error"`
}
StandardError is the standard error response.
Click to show internal directories.
Click to hide internal directories.