server

package
v0.0.0-...-2bc12df Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InternalPlugins = map[string]plugin.Root{
	"aws":        &aws.Root{},
	"docker":     &docker.Root{},
	"gcp":        &gcp.Root{},
	"kubernetes": &kubernetes.Root{},
}

InternalPlugins lists the plugins enabled by default in Wash.

Functions

This section is empty.

Types

type Opts

type Opts struct {
	CPUProfilePath string
	LogFile        string
	// LogLevel can be "warn", "info", "debug", or "trace".
	LogLevel     string
	PluginConfig map[string]map[string]interface{}
}

Opts exposes additional configuration for server operation.

func (Opts) SetupLogging

func (o Opts) SetupLogging() (*os.File, error)

SetupLogging configures log level and output file according to configured options. If an output file was configured, returns a handle for you to close later.

type Server

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

Server encapsulates a running wash server with both Socket and FUSE servers.

func ForVerifyInstall

func ForVerifyInstall(mountpoint string, socket string) *Server

ForVerifyInstall creates a new Server that's meant to be used for verifying a given Wash installation.

func New

func New(mountpoint string, socket string, plugins map[string]plugin.Root, opts Opts) *Server

New creates a new Server. Accepts a list of plugins to load.

func (*Server) Start

func (s *Server) Start() (bool, error)

Start starts the server. It returns once the server is ready. The Boolean value is true if all plugins were successfully loaded

func (*Server) Stop

func (s *Server) Stop()

Stop the server and any related activity. Only one of Wait or Stop should be called.

func (*Server) Wait

func (s *Server) Wait(sigCh chan os.Signal)

Wait blocks until the server exits due to an error or a signal is delivered. Only one of Wait or Stop should be called.

Jump to

Keyboard shortcuts

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