jmxtool

package
v2.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package jmxtool provides some tools for jmx

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSONToKVMap

func JSONToKVMap(jsonStr string) (map[string]string, error)

JSONToKVMap converts JSON string to key value pairs

Types

type APIErr

type APIErr struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

APIErr is the error struct for API

type AgentClient

type AgentClient struct {
	URL        string
	HTTPClient *http.Client
}

AgentClient stores the information of agent client

func NewAgentClient

func NewAgentClient(host, port string) *AgentClient

NewAgentClient creates the agent client

func (*AgentClient) GetAgentInfo

func (agent *AgentClient) GetAgentInfo() (*AgentInfo, error)

GetAgentInfo gets the information of the agent.

func (*AgentClient) UpdateAgentConfig

func (agent *AgentClient) UpdateAgentConfig(config *AgentConfig) error

UpdateAgentConfig updates agent config.

type AgentConfig

type AgentConfig struct {
	spec.Service `json:",inline"`

	Headers  string         `json:"easeagent.progress.forwarded.headers"`
	Reporter *AgentReporter `json:"reporter.outputServer"`
}

AgentConfig is the config pushed to agent.

type AgentInfo

type AgentInfo struct {
	Type    string `json:"type"`
	Version string `json:"version"`
}

AgentInfo stores agent information.

type AgentInterface

type AgentInterface interface {
	UpdateAgentConfig(config *AgentConfig) error
}

AgentInterface is the interface operate the agent client.

type AgentReporter

type AgentReporter struct {
	ReporterTLS *AgentReporterTLS `json:"tls"`

	AppendType      string `json:"appendType"`
	BootstrapServer string `json:"bootstrapServer"`
	Username        string `json:"username"`
	Password        string `json:"password"`
}

AgentReporter is the basic config for agent reporter.

type AgentReporterTLS

type AgentReporterTLS struct {
	Enable bool   `json:"enable"`
	Key    string `json:"key"`
	Cert   string `json:"cert"`
	CACert string `json:"ca_cert"`
}

AgentReporterTLS is the TLS config for agent resporter.

Jump to

Keyboard shortcuts

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