root

package
v0.0.0-...-d2438c5 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	api.DefaultService
	// contains filtered or unexported fields
}

API defines a query API

func NewAPI

func NewAPI(nodeConfigSchema config.Schema, options ...Option) *API

NewAPI creates a API with sane defaults

func (*API) Get

func (a *API) Get(ctx context.Context, req *http.Request) api.Response

Get defines a service for calling "GET" method and returns a response.

func (*API) Name

func (a *API) Name() string

Name returns the API name

func (*API) Patch

func (a *API) Patch(ctx context.Context, req *http.Request) api.Response

Patch defines a service for calling "PATCH" method and returns a response.

func (*API) Put

func (a *API) Put(ctx context.Context, req *http.Request) api.Response

Put defines a service for calling "PUT" method and returns a response.

type Environment

type Environment struct {
	Addresses              []string `json:"addresses" yaml:"addresses"`
	Certificate            string   `json:"certificate" yaml:"certificate"`
	CertificateFingerprint string   `json:"certificate_fingerprint" yaml:"certificate_fingerprint"`
	CertificateKey         string   `json:"certificate_key,omitempty" yaml:"certificate_key,omitempty"`
	Server                 string   `json:"server" yaml:"server"`
	ServerPid              int      `json:"server_pid" yaml:"server_pid"`
	ServerVersion          string   `json:"server_version" yaml:"server_version"`
	ServerClustered        bool     `json:"server_clustered" yaml:"server_clustered"`
	ServerName             string   `json:"server_name" yaml:"server_name"`
}

Environment defines the server environment for the daemon

type Option

type Option func(*options)

Option to be passed to Connect to customize the resulting instance.

func WithLogger

func WithLogger(logger log.Logger) Option

WithLogger sets the logger on the option

type Server

type Server struct {
	Environment Environment            `json:"environment" yaml:"environment"`
	Config      map[string]interface{} `json:"config" yaml:"config"`
}

Server represents the structure for the server

type ServerUpdate

type ServerUpdate struct {
	Config map[string]interface{} `json:"config" yaml:"config"`
}

ServerUpdate represents what can be changed when updating the server information

Jump to

Keyboard shortcuts

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