Documentation ¶
Index ¶
- func CreateConsulTestServer(dc string, t *testing.T) *testutil.TestServer
- func IsTaskHealthy(healthChecksResults []tasks.HealthCheckResult) bool
- func MarathonTaskToConsulService(task tasks.Task, healthChecks []apps.HealthCheck, labels map[string]string) *consulapi.AgentServiceRegistration
- type Agents
- type Auth
- type ConcurrentAgents
- type Consul
- type ConsulConfig
- type ConsulServices
- type ConsulStub
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateConsulTestServer ¶
func CreateConsulTestServer(dc string, t *testing.T) *testutil.TestServer
func IsTaskHealthy ¶
func IsTaskHealthy(healthChecksResults []tasks.HealthCheckResult) bool
func MarathonTaskToConsulService ¶
func MarathonTaskToConsulService(task tasks.Task, healthChecks []apps.HealthCheck, labels map[string]string) *consulapi.AgentServiceRegistration
Types ¶
type ConcurrentAgents ¶
type ConcurrentAgents struct {
// contains filtered or unexported fields
}
func NewAgents ¶
func NewAgents(config *ConsulConfig) *ConcurrentAgents
func (*ConcurrentAgents) GetAgent ¶
func (a *ConcurrentAgents) GetAgent(agentAddress string) (*consulapi.Client, error)
func (*ConcurrentAgents) GetAnyAgent ¶
func (a *ConcurrentAgents) GetAnyAgent() (*consulapi.Client, error)
type Consul ¶
type Consul struct {
// contains filtered or unexported fields
}
func ConsulClientAtServer ¶
func ConsulClientAtServer(server *testutil.TestServer) *Consul
func New ¶
func New(config ConsulConfig) *Consul
func (*Consul) GetAllServices ¶
func (c *Consul) GetAllServices() ([]*consulapi.CatalogService, error)
type ConsulConfig ¶
type ConsulServices ¶
type ConsulServices interface { GetAllServices() ([]*consulapi.CatalogService, error) Register(service *consulapi.AgentServiceRegistration) error Deregister(serviceId string, agent string) error }
type ConsulStub ¶
type ConsulStub struct {
// contains filtered or unexported fields
}
func NewConsulStub ¶
func NewConsulStub() *ConsulStub
func (*ConsulStub) Deregister ¶
func (c *ConsulStub) Deregister(serviceId string, agent string) error
func (ConsulStub) GetAllServices ¶
func (c ConsulStub) GetAllServices() ([]*consulapi.CatalogService, error)
func (*ConsulStub) Register ¶
func (c *ConsulStub) Register(service *consulapi.AgentServiceRegistration) error
Click to show internal directories.
Click to hide internal directories.