http

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAccessToken

func GetAccessToken(retryClient *retryablehttp.Client, tokenUrl, clientId, clientSecret, audience string) (string, error)

func NewWebbaiClient

func NewWebbaiClient(agentVersion, kafkaServer string) api.Client

func SendRequestWithToken

func SendRequestWithToken(retryClient *retryablehttp.Client, url, token string, body []byte) (*http.Response, error)

Types

type AgentInfo added in v0.4.7

type AgentInfo struct {
	AgentVersion               string `json:"agent_version"`
	KafkaServer                string `json:"kafka_server"`
	LastChangeCollectionTime   int64  `json:"last_change_collection_time"`
	LastKafkaCollectionTime    int64  `json:"last_kafka_collection_time"`
	LastResourceCollectionTime int64  `json:"last_resource_collection_time"`
	LastTrafficCollectionTime  int64  `json:"last_traffic_collection_time"`
}

type WebbaiHttpClient

type WebbaiHttpClient struct {
	ClientId     string
	ClientSecret string
	AuthUrl      string
	ChangeUrl    string
	ResourceUrl  string
	MetricsUrl   string
	AgentInfoUrl string
	IssueUrl     string
	// contains filtered or unexported fields
}

func (*WebbaiHttpClient) SendAgentInfo added in v0.4.7

func (c *WebbaiHttpClient) SendAgentInfo() error

func (*WebbaiHttpClient) SendChangeEvent

func (c *WebbaiHttpClient) SendChangeEvent(event *api.ChangeEvent) error

func (*WebbaiHttpClient) SendIssue added in v0.5.3

func (c *WebbaiHttpClient) SendIssue(issueRequest *api.IssueRequest) error

func (*WebbaiHttpClient) SendK8sResources

func (c *WebbaiHttpClient) SendK8sResources(list *api.ResourceList) error

func (*WebbaiHttpClient) SendTrafficMetrics

func (c *WebbaiHttpClient) SendTrafficMetrics(request *prompb.WriteRequest) error

Jump to

Keyboard shortcuts

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