Documentation
¶
Index ¶
- type Configuration
- type ESClient
- type Service
- func (s *Service) ApplyConfiguration(config interface{}) error
- func (s *Service) CheckConfiguration(config interface{}) error
- func (s *Service) Init(config interface{}) (cdsclient.ServiceConfig, error)
- func (s *Service) Serve(c context.Context) error
- func (s *Service) Status(ctx context.Context) *sdk.MonitoringStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct {
Name string `toml:"name" comment:"Name of this CDS elasticsearch Service\n Enter a name to enable this service" json:"name"`
HTTP service.HTTPRouterConfiguration `toml:"http" comment:"######################\n CDS Elasticsearch HTTP Configuration \n######################" json:"http"`
URL string `default:"http://localhost:8088" json:"url"`
ElasticSearch struct {
URL string `toml:"url" json:"url"`
Username string `toml:"username" json:"username"`
Password string `toml:"password" json:"-"`
IndexEventsV2 string `toml:"indexEventsV2" commented:"true" comment:"index to store CDS events v2" json:"indexEventsV2"`
IndexEvents string `toml:"indexEvents" commented:"true" comment:"index to store CDS events" json:"indexEvents"`
IndexMetrics string `toml:"indexMetrics" commented:"true" comment:"index to store CDS metrics" json:"indexMetrics"`
IndexJobSummary string `toml:"indexJobSummary" commented:"true" comment:"index to store CDS jobs summaries" json:"indexJobSummary"`
} `` /* 159-byte string literal not displayed */
EventBus struct {
JobSummaryKafka event.KafkaConsumerConfig `toml:"jobSummaryKafka" json:"jobSummaryKafka" commented:"true" mapstructure:"jobSummaryKafka"`
} `toml:"events" json:"events" commented:"true" mapstructure:"events"`
API service.APIServiceConfiguration `toml:"api" comment:"######################\n CDS Indexes Settings \n######################" json:"api"`
}
Configuration is the vcs configuration structure
type ESClient ¶ added in v0.52.0
type ESClient interface {
SearchDoc(ctx context.Context, index string, query *osquery.SearchRequest, sorts []string, from, size int) (*opensearchapi.SearchResp, error)
Ping(ctx context.Context) error
IndexDocWithoutType(ctx context.Context, index, id string, body interface{}) (*opensearchapi.DocumentCreateResp, error)
}
type Service ¶
type Service struct {
service.Common
Cfg Configuration
Router *api.Router
// contains filtered or unexported fields
}
Service is the elasticsearch service
func (*Service) ApplyConfiguration ¶
ApplyConfiguration apply an object of type elasticsearch.Configuration after checking it
func (*Service) CheckConfiguration ¶
CheckConfiguration checks the validity of the configuration object
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package mock_elasticsearch is a generated GoMock package.
|
Package mock_elasticsearch is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.