Documentation ¶
Overview ¶
Provides an abstraction for job transport.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotTransportable = errors.New("The specified job cannot be executed remotely")
View Source
var Local = HostLocator(localTransport)
The local transport - test against this variable for finding a local interface.
Functions ¶
func GetTransportNames ¶
func GetTransportNames() []string
func RegisterTransport ¶
Define the implementation of a transport for use
func ResolveLocatorHostname ¶
Types ¶
type HostLocator ¶
type HostLocator string
A host port combination representing a remote server - most IP transports can use this default implementation.
func NewHostLocator ¶
func NewHostLocator(value string) (HostLocator, error)
Return an object representing an IP host
func (HostLocator) IsRemote ¶
func (t HostLocator) IsRemote() bool
func (HostLocator) ResolveHostname ¶
func (t HostLocator) ResolveHostname() (string, error)
func (HostLocator) String ¶
func (t HostLocator) String() string
type Locator ¶
type Locator interface { // A string that uniquely identifies this destination String() string // Return a valid hostname for this locator ResolveHostname() (string, error) }
The destination of a transport. All transports must provide a way to resolve the IP remote hostname.
type Transport ¶
type Transport interface { // Return a locator from the given string LocatorFor(string) (Locator, error) // Given a locator, return a job that can be executed // remotely. May return ErrNotTransportable or // ErrNoJobForRequest RemoteJobFor(Locator, interface{}) (jobs.Job, error) }
Allow Jobs to be remotely executed.
func GetTransport ¶
type TransportFlag ¶
type TransportFlag struct { Transport // contains filtered or unexported fields }
Implement the flag.Value interface for reading a transport from a string.
func (*TransportFlag) Get ¶
func (t *TransportFlag) Get() Transport
func (*TransportFlag) Set ¶
func (t *TransportFlag) Set(s string) error
func (*TransportFlag) String ¶
func (t *TransportFlag) String() string
Click to show internal directories.
Click to hide internal directories.