Documentation ¶
Index ¶
- Constants
- type ServerInfo
- type ServersFunctionality
- func (sf *ServersFunctionality) CreateServer(appl app.Application, password string, description string, autostart bool)
- func (sf *ServersFunctionality) DeleteServer(appl app.Application, onion string, currentPassword string) error
- func (sf *ServersFunctionality) DestroyServers()
- func (sh *ServersFunctionality) Disable()
- func (sf *ServersFunctionality) Enable(application app.Application, acn connectivity.ACN)
- func (sh *ServersFunctionality) Enabled() bool
- 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(appl app.Application, onion string)
- func (sh *ServersFunctionality) LaunchServers(appl app.Application, acn connectivity.ACN)
- func (sf *ServersFunctionality) ListServers() []string
- func (sf *ServersFunctionality) LoadServers(appl app.Application, acn connectivity.ACN, password string)
- func (sf *ServersFunctionality) OnACNStatusEvent(appl app.Application, e *event.Event)
- func (sh *ServersFunctionality) SetServerAttribute(appl app.Application, handle string, key string, val string)
- func (sh *ServersFunctionality) Shutdown()
- func (sf *ServersFunctionality) StopServer(appl app.Application, onion string)
- func (sh *ServersFunctionality) StopServers(appl app.Application)
- func (sh *ServersFunctionality) UpdateSettings(appl app.Application, acn connectivity.ACN)
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 ¶
This section is empty.
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 Init ¶
func Init(acn connectivity.ACN, appdir string) *ServersFunctionality
func (*ServersFunctionality) CreateServer ¶
func (sf *ServersFunctionality) CreateServer(appl app.Application, password string, description string, autostart bool)
func (*ServersFunctionality) DeleteServer ¶
func (sf *ServersFunctionality) DeleteServer(appl app.Application, onion string, currentPassword string) error
func (*ServersFunctionality) DestroyServers ¶
func (sf *ServersFunctionality) DestroyServers()
func (*ServersFunctionality) Disable ¶
func (sh *ServersFunctionality) Disable()
func (*ServersFunctionality) Enable ¶
func (sf *ServersFunctionality) Enable(application app.Application, acn connectivity.ACN)
func (*ServersFunctionality) Enabled ¶
func (sh *ServersFunctionality) Enabled() bool
func (*ServersFunctionality) GetServer ¶
func (sf *ServersFunctionality) GetServer(onion string) server.Server
func (*ServersFunctionality) GetServerInfo ¶
func (sf *ServersFunctionality) GetServerInfo(onion string) *ServerInfo
func (*ServersFunctionality) GetServerStatistics ¶
func (sf *ServersFunctionality) GetServerStatistics(onion string) server.Statistics
func (*ServersFunctionality) LaunchServer ¶
func (sf *ServersFunctionality) LaunchServer(appl app.Application, onion string)
func (*ServersFunctionality) LaunchServers ¶
func (sh *ServersFunctionality) LaunchServers(appl app.Application, acn connectivity.ACN)
func (*ServersFunctionality) ListServers ¶
func (sf *ServersFunctionality) ListServers() []string
func (*ServersFunctionality) LoadServers ¶
func (sf *ServersFunctionality) LoadServers(appl app.Application, acn connectivity.ACN, password string)
func (*ServersFunctionality) OnACNStatusEvent ¶
func (sf *ServersFunctionality) OnACNStatusEvent(appl app.Application, e *event.Event)
func (*ServersFunctionality) SetServerAttribute ¶
func (sh *ServersFunctionality) SetServerAttribute(appl app.Application, handle string, key string, val string)
func (*ServersFunctionality) Shutdown ¶
func (sh *ServersFunctionality) Shutdown()
func (*ServersFunctionality) StopServer ¶
func (sf *ServersFunctionality) StopServer(appl app.Application, onion string)
func (*ServersFunctionality) StopServers ¶
func (sh *ServersFunctionality) StopServers(appl app.Application)
func (*ServersFunctionality) UpdateSettings ¶
func (sh *ServersFunctionality) UpdateSettings(appl app.Application, acn connectivity.ACN)
Click to show internal directories.
Click to hide internal directories.