Documentation ¶
Index ¶
- Constants
- func ResolveAWSCredentials(config *Config, aws_config *aws.Config) *credentials.Credentials
- type Client
- func (c *Client) Close()
- func (c *Client) CreateIndex() error
- func (c *Client) DeleteIndex() error
- func (c *Client) Flush() error
- func (c *Client) Get(id string) (*elastic.GetResult, error)
- func (c *Client) GetBlob(path string) (*elastic.GetResult, error)
- func (c *Client) GetCommit(id string) (*elastic.GetResult, error)
- func (c *Client) Index(id string, thing interface{})
- func (c *Client) ParentID() string
- func (c *Client) Remove(id string)
- type Config
Constants ¶
View Source
const ( // TODO: make this configurable / detectable. // Limiting to 10MiB lets us work on small AWS clusters, but unnecessarily // increases round trips in larger or non-AWS clusters MaxBulkSize = 10 * 1024 * 1024 BulkWorkers = 10 )
Variables ¶
This section is empty.
Functions ¶
func ResolveAWSCredentials ¶ added in v0.2.0
func ResolveAWSCredentials(config *Config, aws_config *aws.Config) *credentials.Credentials
ResolveAWSCredentials returns Credentials object
Order of resolution 1. Static Credentials - As configured in Indexer config 2. EC2 Instance Role Credentials
Types ¶
type Client ¶
type Client struct { IndexName string ProjectID string Client *elastic.Client // contains filtered or unexported fields }
func FromEnv ¶
FromEnv creates an Elasticsearch client from the `ELASTIC_CONNECTION_INFO` environment variable
func (*Client) CreateIndex ¶
CreateIndex creates an index matching that created by gitlab-elasticsearch-git v1.1.1
func (*Client) DeleteIndex ¶
Click to show internal directories.
Click to hide internal directories.