manager

package
v0.0.0-...-a355528 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Adapt

func Adapt(rpcClient rpc_client.Client) manager.Manager

Adapt converts a rpc client to a Manager object

func NewClient

func NewClient(socketPath string) (manager.Manager, error)

NewClient returns a plugin interface implementation connected to a remote plugin

Types

type EnforceRequest

type EnforceRequest struct {
	Specs []types.Spec
}

EnforceRequest is the rpc request

type EnforceResponse

type EnforceResponse struct {
}

EnforceResponse is the rpc response

type InspectRequest

type InspectRequest struct {
}

InspectRequest is the rpc request

type InspectResponse

type InspectResponse struct {
	Objects []types.Object
}

InspectResponse is the rpc response

type IsLeaderRequest

type IsLeaderRequest struct {
}

IsLeaderRequest is the rpc request

type IsLeaderResponse

type IsLeaderResponse struct {
	Leader bool
}

IsLeaderResponse is the rpc response

type LeaderLocationRequest

type LeaderLocationRequest struct {
}

LeaderLocationRequest is the rpc request

type LeaderLocationResponse

type LeaderLocationResponse struct {
	Location *url.URL
}

LeaderLocationResponse is the rpc response

type Manager

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

Manager is the exported type for json-rpc

func PluginServer

func PluginServer(p manager.Manager) *Manager

PluginServer returns a Manager that conforms to the net/rpc rpc call convention.

func (*Manager) Enforce

func (p *Manager) Enforce(_ *http.Request, req *EnforceRequest, resp *EnforceResponse) error

Enforce is the rpc method for Manager.Enforce

func (*Manager) ImplementedInterface

func (p *Manager) ImplementedInterface() spi.InterfaceSpec

ImplementedInterface returns the interface implemented by this RPC service.

func (*Manager) Inspect

func (p *Manager) Inspect(_ *http.Request, req *InspectRequest, resp *InspectResponse) error

Inspect is the rpc method for Manager.Inspect

func (*Manager) IsLeader

func (p *Manager) IsLeader(_ *http.Request, req *IsLeaderRequest, resp *IsLeaderResponse) error

IsLeader returns information about leadership status for this manager.

func (*Manager) LeaderLocation

func (p *Manager) LeaderLocation(_ *http.Request, req *LeaderLocationRequest, resp *LeaderLocationResponse) error

LeaderLocation returns the location of the leader

func (*Manager) Terminate

func (p *Manager) Terminate(_ *http.Request, req *TerminateRequest, resp *TerminateResponse) error

Terminate is the rpc method for Manager.Terminate

func (*Manager) Types

func (p *Manager) Types() []string

Types returns the types exposed by this kind of RPC service

type TerminateRequest

type TerminateRequest struct {
	Specs []types.Spec
}

TerminateRequest is the rpc request

type TerminateResponse

type TerminateResponse struct {
}

TerminateResponse is the rpc response

Jump to

Keyboard shortcuts

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