elasticsearch
No long description provided.
Installation
dagger install github.com/mgreau/daggerverse/elasticsearch@v0.1.0
Entrypoint
Return Type
Elasticsearch !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
ctr | Container | - | An OCI-compatible container, also known as a Docker container. |
version | String ! | "8.13.2" | No description provided |
mode | String ! | "dev" | No description provided |
javaOpts | String ! | "-Xms4g -Xms4g" | No description provided |
curl | Container | - | An OCI-compatible container, also known as a Docker container. |
Example
func (m *myModule) example(version string, mode string, javaOpts string) *Elasticsearch {
return dag.
Elasticsearch(version, mode, javaOpts)
}
Types
Elasticsearch 🔗
ctr() 🔗
An OCI-compatible container, also known as a Docker container.
Return Type
Container !
Example
func (m *myModule) example(version string, mode string, javaOpts string) *Container {
return dag.
Elasticsearch(version, mode, javaOpts).
Ctr()
}
version() 🔗
Return Type
String !
Example
func (m *myModule) example(ctx context.Context, version string, mode string, javaOpts string) string {
return dag.
Elasticsearch(version, mode, javaOpts).
Version(ctx)
}
mode() 🔗
Return Type
String !
Example
func (m *myModule) example(ctx context.Context, version string, mode string, javaOpts string) string {
return dag.
Elasticsearch(version, mode, javaOpts).
Mode(ctx)
}
javaOpts() 🔗
Return Type
String !
Example
func (m *myModule) example(ctx context.Context, version string, mode string, javaOpts string) string {
return dag.
Elasticsearch(version, mode, javaOpts).
JavaOpts(ctx)
}
service() 🔗
Create an Elasticsearch service in dev mode by default
Return Type
Service !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
port | Integer ! | 9200 | No description provided |
Example
func (m *myModule) example(version string, mode string, javaOpts string, port int) *Service {
return dag.
Elasticsearch(version, mode, javaOpts).
Service(port)
}
get() 🔗
Sends a GET request to the ES service and returns the response.
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
path | String ! | "" | No description provided |
port | Integer ! | 9200 | No description provided |
Example
func (m *myModule) example(ctx context.Context, version string, mode string, javaOpts string, path string, port int) string {
return dag.
Elasticsearch(version, mode, javaOpts).
Get(ctx, path, port)
}
delete() 🔗
Delete an Elasticsearch index.
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
index | String ! | "" | No description provided |
port | Integer ! | 9200 | No description provided |
Example
func (m *myModule) example(ctx context.Context, version string, mode string, javaOpts string, index string, port int) string {
return dag.
Elasticsearch(version, mode, javaOpts).
Delete(ctx, index, port)
}
indexData() 🔗
Index a document from a file into Elasticsearch.
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
data | File ! | - | A file. |
index | String ! | "my-index" | No description provided |
port | Integer ! | 9200 | No description provided |
Example
func (m *myModule) example(ctx context.Context, version string, mode string, javaOpts string, data *File, index string, port int) string {
return dag.
Elasticsearch(version, mode, javaOpts).
IndexData(ctx, data, index, port)
}
indexBulkData() 🔗
Index documents into Elasticsearch with the bulk API.
The data file should be in a format that is compatible with the Elasticsearch bulk API.
Doc: https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html#docs-bulk
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
data | File ! | - | A file. |
port | Integer ! | 9200 | No description provided |
Example
func (m *myModule) example(ctx context.Context, version string, mode string, javaOpts string, data *File, port int) string {
return dag.
Elasticsearch(version, mode, javaOpts).
IndexBulkData(ctx, data, port)
}
fullTextSearch() 🔗
Returns search hits that match the query defined in the request.
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
index | String ! | "" | No description provided |
field | String ! | "" | No description provided |
query | String ! | "" | No description provided |
port | Integer ! | 9200 | No description provided |
Example
func (m *myModule) example(ctx context.Context, version string, mode string, javaOpts string, index string, field string, query string, port int) string {
return dag.
Elasticsearch(version, mode, javaOpts).
FullTextSearch(ctx, index, field, query, port)
}