server

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2019 License: BSD-2-Clause Imports: 18 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {
	Error       string `json:"error"`
	Description string `json:"error_description"`
}

ErrorResponse represents a response for errors.

type HealthResponse

type HealthResponse struct {
	HostIP    string `json:"hostIP"`
	ProjectID string `json:"projectId"`
}

HealthResponse represents a response for the health check.

type Server

type Server struct {
	APIServer             string
	APIToken              string
	AppPort               string
	IAMServiceAccountKey  string
	IAMScopeKey           string
	DefaultServiceAccount string
	DefaultScopes         string
	MetadataAddress       string
	MetadataProxyAddress  string
	HostInterface         string
	HostIP                string
	NodeName              string
	NamespaceKey          string
	LogLevel              string
	LogFormat             string
	AddIPTablesRule       bool
	Debug                 bool
	EnableMetadataProxy   bool
	Insecure              bool
	NamespaceRestriction  bool
	Verbose               bool
	Version               bool

	BackoffMaxElapsedTime time.Duration
	BackoffMaxInterval    time.Duration
	// contains filtered or unexported fields
}

Server encapsulates all of the parameters necessary for starting up the server. These can either be set via command line or directly.

func NewServer

func NewServer() *Server

NewServer will create a new Server with default values.

func (*Server) Run

func (s *Server) Run(host, token, nodeName string, insecure bool) error

Run runs the specified Server.

type ServiceAccount

type ServiceAccount struct {
	Aliases []string `json:"aliases"`
	Email   string   `json:"email"`
	Scopes  []string `json:"scopes"`
}

ServiceAccount represents a response for a service account.

Jump to

Keyboard shortcuts

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