Documentation ¶
Index ¶
- Variables
- type Consul
- func (c *Consul) Declare(s service.Service) error
- func (c *Consul) GetIngestionJobConfiguration(id string) (*cingestion.IngestionJobConfiguration, error)
- func (c *Consul) GetIngestionJobStatus(id string) (cingestion.JobStatus, error)
- func (c *Consul) GetService(s service.Service) error
- func (c *Consul) GetTableConfiguration(name string) (*entities.Table, error)
- func (c *Consul) Heartbeat(s service.Service)
- func (c *Consul) Init() error
- func (c *Consul) PutIngestionJobConfiguration(config *cingestion.IngestionJobConfiguration) error
- func (c *Consul) PutIngestionJobStatus(id string, status cingestion.JobStatus) error
- func (c *Consul) PutTableConfiguration(table *entities.Table) error
- func (c *Consul) Start(s service.Service) error
- func (c *Consul) Stop(s service.Service) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TTL time to life for service in consul TTL int = 15 // Where the ServiceKVPath resides ServicesKVpath string = "services" // Where the JobsKVPath resides JobsKVPath string = "ingestion-jobs" // Where the TablesKVPath resides TablesKVPath string = "tables" // Config falls back to client default config ConsulConfig *api.Config = api.DefaultConfig() )
Functions ¶
This section is empty.
Types ¶
type Consul ¶
type Consul struct { // Agent to register service Agent *api.Agent // KV to save service definition KV *api.KV // contains filtered or unexported fields }
Consul structure
func (*Consul) GetIngestionJobConfiguration ¶
func (c *Consul) GetIngestionJobConfiguration(id string) (*cingestion.IngestionJobConfiguration, error)
Retrieve the consul ingestion job configuration
func (*Consul) GetIngestionJobStatus ¶
func (c *Consul) GetIngestionJobStatus(id string) (cingestion.JobStatus, error)
Retrieve the consul ingestion job status
func (*Consul) GetService ¶
Retrieve the consul service definition
func (*Consul) GetTableConfiguration ¶
Retrieve the consul table configuration
func (*Consul) PutIngestionJobConfiguration ¶
func (c *Consul) PutIngestionJobConfiguration(config *cingestion.IngestionJobConfiguration) error
Store the consul ingestion job configuration
func (*Consul) PutIngestionJobStatus ¶
func (c *Consul) PutIngestionJobStatus(id string, status cingestion.JobStatus) error
Store the consul ingestion job status
func (*Consul) PutTableConfiguration ¶
Store the consul table configuration
Click to show internal directories.
Click to hide internal directories.