Documentation ¶
Index ¶
- Constants
- func Disable()
- func Enabled() bool
- func InitServers(acn connectivity.ACN, appdir string, pfn PublishFn)
- func Shutdown()
- type PublishFn
- type ServerInfo
- type ServersFunctionality
- func (sf *ServersFunctionality) CreateServer(password string) (server.Server, error)
- func (sf *ServersFunctionality) DeleteServer(onion string, currentPassword string) error
- func (sf *ServersFunctionality) DestroyServers()
- func (sf *ServersFunctionality) Enable()
- func (sf *ServersFunctionality) GetServer(onion string) server.Server
- func (sf *ServersFunctionality) GetServerInfo(onion string) *ServerInfo
- func (sf *ServersFunctionality) GetServerStatistics(onion string) server.Statistics
- func (sf *ServersFunctionality) LaunchServer(onion string)
- func (sf *ServersFunctionality) ListServers() []string
- func (sf *ServersFunctionality) LoadServers(password string) ([]string, error)
- func (sf *ServersFunctionality) StopServer(onion string)
Constants ¶
View Source
const ( ZeroServersLoaded = event.Type("ZeroServersLoaded") NewServer = event.Type("NewServer") ServerIntentUpdate = event.Type("ServerIntentUpdate") ServerDeleted = event.Type("ServerDeleted") ServerStatsUpdate = event.Type("ServerStatsUpdate") )
View Source
const ( Intent = event.Field("Intent") TotalMessages = event.Field("TotalMessages") Connections = event.Field("Connections") )
View Source
const ( IntentRunning = "running" IntentStopped = "stopped" )
Variables ¶
This section is empty.
Functions ¶
func InitServers ¶
func InitServers(acn connectivity.ACN, appdir string, pfn PublishFn)
Types ¶
type ServerInfo ¶
type ServerInfo struct { Onion string ServerBundle string Autostart bool Running bool Description string StorageType string }
func (*ServerInfo) EnrichEvent ¶
func (si *ServerInfo) EnrichEvent(e *event.Event)
type ServersFunctionality ¶
type ServersFunctionality struct { }
ServersFunctionality provides experiment gated server functionality
func ExperimentGate ¶
func ExperimentGate(experimentMap map[string]bool) (*ServersFunctionality, error)
ExperimentGate returns ServersFunctionality if the experiment is enabled, and an error otherwise.
func (*ServersFunctionality) CreateServer ¶
func (sf *ServersFunctionality) CreateServer(password string) (server.Server, error)
func (*ServersFunctionality) DeleteServer ¶
func (sf *ServersFunctionality) DeleteServer(onion string, currentPassword string) error
func (*ServersFunctionality) DestroyServers ¶
func (sf *ServersFunctionality) DestroyServers()
func (*ServersFunctionality) Enable ¶ added in v1.5.1
func (sf *ServersFunctionality) Enable()
func (*ServersFunctionality) GetServer ¶
func (sf *ServersFunctionality) GetServer(onion string) server.Server
func (*ServersFunctionality) GetServerInfo ¶
func (sf *ServersFunctionality) GetServerInfo(onion string) *ServerInfo
func (*ServersFunctionality) GetServerStatistics ¶ added in v1.5.1
func (sf *ServersFunctionality) GetServerStatistics(onion string) server.Statistics
func (*ServersFunctionality) LaunchServer ¶
func (sf *ServersFunctionality) LaunchServer(onion string)
func (*ServersFunctionality) ListServers ¶
func (sf *ServersFunctionality) ListServers() []string
func (*ServersFunctionality) LoadServers ¶
func (sf *ServersFunctionality) LoadServers(password string) ([]string, error)
func (*ServersFunctionality) StopServer ¶
func (sf *ServersFunctionality) StopServer(onion string)
Click to show internal directories.
Click to hide internal directories.