api

package
v1.29.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2025 License: AGPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const Cluster = "cluster_settings"
View Source
const Index = "index_settings"
View Source
const LastAgentHash = "last_agent_hash"
View Source
const Node = "node_settings"

Variables

This section is empty.

Functions

func GetElasticLogFileContent

func GetElasticLogFileContent(ctx context.Context, instance *model.Instance, body interface{}) (interface{}, error)

func GetElasticLogFiles

func GetElasticLogFiles(ctx context.Context, instance *model.Instance, logsPath string) (interface{}, error)

func GetElasticsearchNodesViaAgent

func GetElasticsearchNodesViaAgent(ctx context.Context, endpoint string) (*elastic.DiscoveryResult, error)

get nodes info via agent

func GetEnrolledNodesByAgent

func GetEnrolledNodesByAgent(instanceID string) (map[string]BindingItem, error)

node -> binding item

func Init

func Init()

func NewClusterSettings

func NewClusterSettings(clusterID string) *model.Setting

func NewIndexSettings

func NewIndexSettings(clusterID, nodeID, agentID, indexName, indexID string) *model.Setting

func NewNodeAgentSettings

func NewNodeAgentSettings(instanceID string, item *BindingItem) *model.Setting

Types

type APIHandler

type APIHandler struct {
	core.Handler
}

func (*APIHandler) GetHostAgentInfo

func (h *APIHandler) GetHostAgentInfo(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

func (*APIHandler) GetHostElasticProcess

func (h *APIHandler) GetHostElasticProcess(w http.ResponseWriter, req *http.Request, ps httprouter.Params)

type BindingItem

type BindingItem struct {
	//infini system assigned id
	ClusterID string `json:"cluster_id"`

	ClusterUUID string `json:"cluster_uuid"`
	NodeUUID    string `json:"node_uuid"`

	Updated int64 `json:"updated"`
}

type ClusterInfo

type ClusterInfo struct {
	ClusterIDs []string `json:"cluster_id"`
}

type RemoteConfig

type RemoteConfig struct {
	orm.ORMObjectBase
	Metadata model.Metadata    `json:"metadata" elastic_mapping:"metadata: { type: object }"`
	Payload  common.ConfigFile `json:"payload" elastic_mapping:"payload: { type: object}"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL