server

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2017 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginInfo added in v0.2.0

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

PluginInfo is the service object for the RPC metadata service

func NewPluginInfo added in v0.2.0

func NewPluginInfo(receiver interface{}) (*PluginInfo, error)

NewPluginInfo returns an instance of the metadata service

func (*PluginInfo) Register added in v0.2.0

func (m *PluginInfo) Register(receiver interface{}) error

Register registers an rpc-capable object for introspection and metadata service

func (*PluginInfo) ServeHTTP added in v0.2.0

func (m *PluginInfo) ServeHTTP(resp http.ResponseWriter, req *http.Request)

ServeHTTP implements the http.Handler interface and responds by returning information about the plugin.

type Stoppable

type Stoppable interface {
	Stop()
	AwaitStopped()
}

Stoppable support proactive stopping, and blocking until stopped.

func StartPluginAtPath

func StartPluginAtPath(socketPath string, receiver VersionedInterface) (Stoppable, error)

StartPluginAtPath starts an HTTP server listening on a unix socket at the specified path. Returns a Stoppable that can be used to stop or block on the server.

type VersionedInterface

type VersionedInterface interface {
	// ImplementedInterface returns the interface being provided.
	ImplementedInterface() spi.InterfaceSpec
}

A VersionedInterface identifies which Interfaces a plugin supports.

Jump to

Keyboard shortcuts

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