server_hosting

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL