services

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2019 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const CTRL_BASEURL string = `/_/`
View Source
const DEFAULT_PORT uint = 17779
View Source
const EXEC_BASEURL string = `/run`
View Source
const OPWIRE_EDITION_PREFIX string = "OPWIRE_EDITION"
View Source
const OPWIRE_EDITION_PREFIX_PLUS string = OPWIRE_EDITION_PREFIX + "="
View Source
const OPWIRE_REQUEST_PREFIX string = "OPWIRE_REQUEST"
View Source
const OPWIRE_REQUEST_PREFIX_PLUS string = OPWIRE_REQUEST_PREFIX + "="
View Source
const OPWIRE_SETTINGS_PREFIX string = "OPWIRE_SETTINGS"
View Source
const OPWIRE_SETTINGS_PREFIX_PLUS string = OPWIRE_SETTINGS_PREFIX + "="

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentServer

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

func NewAgentServer

func NewAgentServer(c *ServerOptions) (s *AgentServer, err error)

func (*AgentServer) Shutdown

func (s *AgentServer) Shutdown() error

func (*AgentServer) Start

func (s *AgentServer) Start() error

type CommandExecutor added in v1.0.4

type CommandExecutor interface {
	Register(descriptor *invokers.CommandDescriptor, names ...string) error
	ResolveCommandDescriptor(opts *invokers.CommandInvocation) (descriptor *invokers.CommandDescriptor, resourceName *string, methodName *string, err error)
	GetSettings(resourceName string) []string
	StoreSettings(prefix string, settings map[string]interface{}, format string, resourceName string) error
	Run(io.Reader, *invokers.CommandInvocation, io.Writer, io.Writer) (*invokers.ExecutionState, error)
}

type Map

type Map = map[string]interface{}

type ReqSerializer

type ReqSerializer struct{}

func NewReqSerializer

func NewReqSerializer() (*ReqSerializer, error)

func (*ReqSerializer) Decode

func (s *ReqSerializer) Decode(data []byte) (*RequestPacket, error)

func (*ReqSerializer) Encode

func (s *ReqSerializer) Encode(r *http.Request) ([]byte, error)

type RequestPacket

type RequestPacket struct {
	Header http.Header         `json:"header"`
	Query  url.Values          `json:"query"`
	Params map[string][]string `json:"params"`
}

type ServerEdition

type ServerEdition struct {
	Revision string `json:"revision"`
	Version  string `json:"version"`
}

type ServerOptions

type ServerOptions struct {
	Host              string
	Port              uint
	ConfigPath        string
	DirectCommand     string
	StaticPath        map[string]string
	SuppressAutoStart bool
	Edition           ServerEdition
}

type StateStore

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

func NewStateStore

func NewStateStore() (*StateStore, error)

func (*StateStore) Get

func (ss *StateStore) Get(key string) interface{}

func (*StateStore) GetAsJSON

func (ss *StateStore) GetAsJSON(key string) ([]byte, error)

func (*StateStore) Store

func (ss *StateStore) Store(key string, val interface{}) *StateStore

Jump to

Keyboard shortcuts

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