control

package
v0.0.0-...-8d6e374 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeConn

func ServeConn(conn net.Conn, c *ControlRPC)

ServeConn takes a net connection, registers the Control module and serves RPC

Types

type Agent

type Agent interface {
}

type ControlClient

type ControlClient struct {
	*rpc.Client
}

ControlClient is our custom rpc client for Control connections

func NewClient

func NewClient(conn net.Conn) *ControlClient

NewControlClient return a new ControlClient based off of the provided connection

func (*ControlClient) Register

func (c *ControlClient) Register(agent string) (*RegisterReply, error)

Register is a stub to the Control.Register RPC method

type ControlRPC

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

func NewRPC

func NewRPC(dir Director) *ControlRPC

func (*ControlRPC) Register

func (c *ControlRPC) Register(agent *string, reply *RegisterReply) error

type Director

type Director interface {
	LoadAgent(string) (Agent, error)
	RegisterAgent(string, Agent)
}

type RegisterReply

type RegisterReply struct {
	Ok      bool
	Expires int
}

Jump to

Keyboard shortcuts

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