servers

package
v1.10.5 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: MIT Imports: 10 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

func Disable added in v1.5.1

func Disable()

func Enabled added in v1.5.1

func Enabled() bool

func InitServers

func InitServers(acn connectivity.ACN, appdir string, pfn PublishFn)

func Shutdown added in v1.5.1

func Shutdown()

Types

type PublishFn added in v1.5.1

type PublishFn func(event.Event)

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)

Jump to

Keyboard shortcuts

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