Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // RegistryPath sets the location in etcd where portmapper will store data. // Default: /opsee.co/portmapper EtcdHost = "http://127.0.0.1:2379" RegistryPath = "/opsee.co/portmapper" // max retries for exponential backoff MaxRetries = 3 RequestTimeoutSec time.Duration = 5 )
Functions ¶
Types ¶
type Service ¶
type Service struct { Name string `json:"name"` Port int `json:"port"` Hostname string `json:"hostname,omitempty"` }
Service is a mapping between a service name and port. It may also contain the hostname where the service is running or the container ID in the Hostname field. It will attempt to get this from the HOSTNAME environment variable.
func Services ¶
Services returns an array of Service pointers detailing the service name and port of each registered service. (from etcd)
func UnmarshalService ¶
UnmarshalService deserializes a Service object from a byte array.
Click to show internal directories.
Click to hide internal directories.