method

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadBody

func ReadBody(resp *http.Response) (*bytes.Buffer, error)

Types

type Configuration

type Configuration struct {
	ActiveProfiles  []interface{}     `json:"activeProfiles"`
	PropertySources []PropertySources `json:"PropertySources"`
}

func (*Configuration) Clone

func (e *Configuration) Clone() *Configuration

func (*Configuration) GetProperties

func (e *Configuration) GetProperties() map[string]string

func (*Configuration) Marshal

func (e *Configuration) Marshal() ([]byte, error)

func (*Configuration) ProfilesActive

func (e *Configuration) ProfilesActive() bool

func (*Configuration) Unmarshal

func (e *Configuration) Unmarshal(data []byte) error

Unmarshal json反序列化

func (*Configuration) UpdatePropertiesValue

func (e *Configuration) UpdatePropertiesValue(maps map[string]string)

func (*Configuration) WriteProperties

func (e *Configuration) WriteProperties(path string) error

type JolokiaList

type JolokiaList struct {
	Value map[string]map[string]info `json:"value"`
}

func (*JolokiaList) GetGetProperty

func (j *JolokiaList) GetGetProperty() string

GetGetProperty 获取 getProperty 的 mbean

func (*JolokiaList) IsGetProperty

func (j *JolokiaList) IsGetProperty() bool

IsGetProperty 判断是否存在 getProperty 的 mbean

type PropertySources

type PropertySources struct {
	Name  string                   `json:"name"`
	Props map[string]PropertyValue `json:"properties"`
}

type PropertyValue

type PropertyValue struct {
	Value  interface{} `json:"value"`
	Origin string      `json:"origin"`
}

type Session

type Session struct {
	Options    *types.Options
	Client     *retryablehttp.Client
	RetryMax   int
	RateLimits *ratelimit.MultiLimiter
}

Session handles session agent sessions

func NewSession

func NewSession(options *types.Options) (sessions *Session, err error)

func (*Session) Do

func (s *Session) Do(req *retryablehttp.Request) (*http.Response, error)

func (*Session) Get

func (s *Session) Get(url string) (*http.Response, error)

func (*Session) GetEnvJson

func (s *Session) GetEnvJson(domain string, urls ...string) (map[string]*Configuration, error)

func (*Session) GetJolokiaList

func (s *Session) GetJolokiaList(domain string, urls ...string) (map[string]*JolokiaList, error)

func (*Session) NewRequest

func (s *Session) NewRequest(method, url string, body interface{}) (*retryablehttp.Request, error)

Directories

Path Synopsis
agent
one

Jump to

Keyboard shortcuts

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