daemon

package
v0.0.0-...-94a378c Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigPaths = []string{
	"/etc/minecraft-sidecart/daemon.json",
	"$HOME/.config/minecraft-sidecart/daemon.json",
}

ConfigPaths holds paths to look for the daemon configuration file. We'll try the first entry and then the next until we find a valid entry. If no entry is found, we'll create an empty config and save it in the last path.

View Source
var DefaultRootDir = os.TempDir()

Functions

func DefaultAddress

func DefaultAddress() (*net.UnixAddr, error)

Types

type Daemon

type Daemon struct {
	// contains filtered or unexported fields
}

func NewDaemon

func NewDaemon(ctx context.Context,
	app *firebase.App, auth *firebase.Auth) (*Daemon, error)

func (*Daemon) AddServer

func (dae *Daemon) AddServer(
	spec ServerSpec, id *string) (err error)

func (*Daemon) SignIn

func (dae *Daemon) SignIn(
	user *firebase.User, token *oauth2.Token) (err error)

type RPCDaemon

type RPCDaemon struct {
	// contains filtered or unexported fields
}

func NewRPCDaemon

func NewRPCDaemon(ctx context.Context,
	app *firebase.App, auth *firebase.Auth) (*RPCDaemon, error)

func (*RPCDaemon) Close

func (dae *RPCDaemon) Close()

func (*RPCDaemon) Run

func (dae *RPCDaemon) Run(ctx context.Context) error

type ServerSpec

type ServerSpec struct {
	Path string
	Name string
}

Jump to

Keyboard shortcuts

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