Documentation
¶
Index ¶
- func CreateConsulTestServer(dc string, t *testing.T) *testutil.TestServer
- type Agents
- type Auth
- type ConcurrentAgents
- type Consul
- func (c *Consul) Deregister(serviceId apps.TaskId, agentAddress string) error
- func (c *Consul) GetAgent(agentAddress string) (*consulapi.Client, error)
- func (c *Consul) GetAllServices() ([]*consulapi.CatalogService, error)
- func (c *Consul) GetServices(name string) ([]*consulapi.CatalogService, error)
- func (c *Consul) Register(task *apps.Task, app *apps.App) error
- type ConsulConfig
- type ConsulServices
- type ConsulStub
- func (c *ConsulStub) Deregister(serviceId apps.TaskId, agent string) error
- func (c *ConsulStub) GetAgent(agentAddress string) (*consulapi.Client, error)
- func (c ConsulStub) GetAllServices() ([]*consulapi.CatalogService, error)
- func (c ConsulStub) GetServices(name string) ([]*consulapi.CatalogService, error)
- func (c *ConsulStub) Register(task *apps.Task, app *apps.App) error
- func (c *ConsulStub) RegisteredServicesIds() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateConsulTestServer ¶
func CreateConsulTestServer(dc string, t *testing.T) *testutil.TestServer
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(agentHost 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) Deregister ¶
func (*Consul) GetAllServices ¶
func (c *Consul) GetAllServices() ([]*consulapi.CatalogService, error)
func (*Consul) GetServices ¶ added in v0.3.1
func (c *Consul) GetServices(name string) ([]*consulapi.CatalogService, error)
type ConsulConfig ¶
type ConsulServices ¶
type ConsulServices interface { GetAllServices() ([]*consulapi.CatalogService, error) GetServices(name string) ([]*consulapi.CatalogService, error) Register(task *apps.Task, app *apps.App) error Deregister(serviceId apps.TaskId, agentAddress string) error GetAgent(agentAddress string) (*consulapi.Client, error) }
type ConsulStub ¶
type ConsulStub struct { ErrorServices map[apps.TaskId]error ErrorGetServices map[string]error // contains filtered or unexported fields }
func NewConsulStub ¶
func NewConsulStub() *ConsulStub
func NewConsulStubWithTag ¶ added in v0.3.2
func NewConsulStubWithTag(tag string) *ConsulStub
func (*ConsulStub) Deregister ¶
func (c *ConsulStub) Deregister(serviceId apps.TaskId, agent string) error
func (*ConsulStub) GetAgent ¶ added in v0.3.1
func (c *ConsulStub) GetAgent(agentAddress string) (*consulapi.Client, error)
func (ConsulStub) GetAllServices ¶
func (c ConsulStub) GetAllServices() ([]*consulapi.CatalogService, error)
func (ConsulStub) GetServices ¶ added in v0.3.1
func (c ConsulStub) GetServices(name string) ([]*consulapi.CatalogService, error)
func (*ConsulStub) RegisteredServicesIds ¶
func (c *ConsulStub) RegisteredServicesIds() []string
Click to show internal directories.
Click to hide internal directories.