controller

package
v0.0.54 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: Apache-2.0, MIT Imports: 53 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CorsMiddleware added in v0.0.36

func CorsMiddleware(next http.Handler) http.Handler

Types

type Controller

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

func New

func New(ctx *cli.Context) (*Controller, error)

func NewWithDependencies

func NewWithDependencies(ctx *cli.Context, listener, graphqlListener net.Listener, recorder metrics.MetricsRecorder, backend state.State, pub publisher.Publisher) (*Controller, error)

func (*Controller) Addr

func (c *Controller) Addr() string

func (*Controller) Port

func (c *Controller) Port() int

func (*Controller) Serve

func (c *Controller) Serve() error

Serve starts the server and blocks until the server is closed, either explicitly via Shutdown, or due to a fault condition. It propagates the non-nil err return value from http.Serve.

func (*Controller) Shutdown

func (c *Controller) Shutdown(ctx context.Context) error

type DaemonList added in v0.0.23

type DaemonList struct {
	Daemons []DaemonWithFunds `json:"daemons"`
}

type DaemonWithFunds added in v0.0.28

type DaemonWithFunds struct {
	Daemon *spawn.Daemon `json:"daemon"`
	Funds  Funds         `json:"funds,omitempty"`
}

type Funds added in v0.0.28

type Funds struct {
	Balance big.Int `json:"balance,omitempty"`
	DataCap big.Int `json:"datacap,omitempty"`
}

type RegionList added in v0.0.23

type RegionList struct {
	Regions []string `json:"regions"`
}

type TaskStatus

type TaskStatus struct {
	UUID    string      `json:"uuid"`
	Type    string      `json:"type"`
	Payload interface{} `json:"payload"`
}

Directories

Path Synopsis
gen

Jump to

Keyboard shortcuts

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