mattermost-community-enterp.../vendor/github.com/opensearch-project/opensearch-go/v4/opensearchapi/api_cat-tasks.go
Claude ec1f89217a Merge: Complete Mattermost Server with Community Enterprise
Full Mattermost server source with integrated Community Enterprise features.
Includes vendor directory for offline/air-gapped builds.

Structure:
- enterprise-impl/: Enterprise feature implementations
- enterprise-community/: Init files that register implementations
- enterprise/: Bridge imports (community_imports.go)
- vendor/: All dependencies for offline builds

Build (online):
  go build ./cmd/mattermost

Build (offline/air-gapped):
  go build -mod=vendor ./cmd/mattermost

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 23:59:07 +09:00

63 lines
1.7 KiB
Go

// SPDX-License-Identifier: Apache-2.0
//
// The OpenSearch Contributors require contributions made to
// this file be licensed under the Apache-2.0 license or a
// compatible open source license.
package opensearchapi
import (
"net/http"
"github.com/opensearch-project/opensearch-go/v4"
)
// CatTasksReq represent possible options for the /_cat/tasks request
type CatTasksReq struct {
Header http.Header
Params CatTasksParams
}
// GetRequest returns the *http.Request that gets executed by the client
func (r CatTasksReq) GetRequest() (*http.Request, error) {
return opensearch.BuildRequest(
"GET",
"/_cat/tasks",
nil,
r.Params.get(),
r.Header,
)
}
// CatTasksResp represents the returned struct of the /_cat/tasks response
type CatTasksResp struct {
Tasks []CatTaskResp
response *opensearch.Response
}
// CatTaskResp represents one index of the CatTasksResp
type CatTaskResp struct {
ID string `json:"id"`
Action string `json:"action"`
TaskID string `json:"task_id"`
ParentTaskID string `json:"parent_task_id"`
Type string `json:"type"`
StartTime int `json:"start_time,string"`
Timestamp string `json:"timestamp"`
RunningTimeNs int `json:"running_time_ns,string"`
RunningTime string `json:"running_time"`
NodeID string `json:"node_id"`
IP string `json:"ip"`
Port int `json:"port,string"`
Node string `json:"node"`
Version string `json:"version"`
XOpaqueID string `json:"x_opaque_id"`
}
// Inspect returns the Inspect type containing the raw *opensearch.Reponse
func (r CatTasksResp) Inspect() Inspect {
return Inspect{
Response: r.response,
}
}