instance

package
v0.0.0-...-c5dc566 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package instance holds functions for creating a Marmot instance and methods for running the instance.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	// SIP is the IP address to use for Stubby.  By default, it listens on all
	// IP addresses.  Use "localhost" if you just want just 127.0.0.1.
	SIP string
	// SPort is the port to use for the Stubby service.
	SPort int32
	// MaxCrashses is the maximum number of plugin crashes to allow.
	MaxCrashes int
	// Insecure indicates that you are not going to be using transport encryption.
	// THIS IS A BAD IDEA EXCEPT FOR TESTS!!!!!!
	Insecure bool
	// CertFile and KeyFile are paths to a certificate or key file.
	CertFile, KeyFile string
	// Storage is the type of backend storage to use.
	Storage string
	// CogKV is the Key/Value storage for all Cogs.
	CogKV cogStorage.Reader
}

Args are arguments to New().

type Instance

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

Instance holds an instance of a Marmot server.

func New

func New(args Args) (*Instance, error)

New is the constructor for Instance.

func (*Instance) Addr

func (i *Instance) Addr() string

Addr returns the address the server is running on.

func (*Instance) Run

func (i *Instance) Run()

Run attempts to run a Marmot instance.

func (*Instance) Stop

func (i *Instance) Stop()

Stop stops the GRPC service. This should only be used in tests as there is no guarentees that all child goroutines will stop.

func (*Instance) Storage

func (i *Instance) Storage() work.Storage

Storage returns the storage object being used by the server.

Jump to

Keyboard shortcuts

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