api

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RedactEnvVar = false

Functions

This section is empty.

Types

type ChangeEvent

type ChangeEvent struct {
	OldObject *unstructured.Unstructured `json:"old_object"`
	NewObject *unstructured.Unstructured `json:"new_object"`
	EventType EventType                  `json:"event_type"`
	Time      int64                      `json:"time"`
}

func NewK8sChangeEvent

func NewK8sChangeEvent(oldObj, newObj *unstructured.Unstructured) *ChangeEvent

func NewKafkaChangeEvent

func NewKafkaChangeEvent(oldObj, newObj interface{}, apiKey string) *ChangeEvent

type Client

type Client interface {
	SendChangeEvent(*ChangeEvent) error
	SendK8sResources(*ResourceList) error
	SendTrafficMetrics(*prompb.WriteRequest) error
	SendIssue(*IssueRequest) error
	SendAgentInfo() error
}

type EventType

type EventType string
const (
	ObjectAdd    EventType = "object_add"
	ObjectUpdate EventType = "object_update"
	ObjectDelete EventType = "object_delete"
	KafkaUpdate  EventType = "kafka_update"
)

type IssueRequest added in v0.5.3

type IssueRequest struct {
	IssueSource string `json:"issue_source"`
	Data        string `json:"data"`
}

type NoOpClient

type NoOpClient struct {
}

func (*NoOpClient) SendAgentInfo added in v0.4.7

func (nc *NoOpClient) SendAgentInfo() error

func (*NoOpClient) SendChangeEvent

func (nc *NoOpClient) SendChangeEvent(*ChangeEvent) error

func (*NoOpClient) SendIssue added in v0.5.3

func (nc *NoOpClient) SendIssue(request *IssueRequest) error

func (*NoOpClient) SendK8sResources

func (nc *NoOpClient) SendK8sResources(*ResourceList) error

func (*NoOpClient) SendTrafficMetrics

func (nc *NoOpClient) SendTrafficMetrics(*prompb.WriteRequest) error

type ResourceList

type ResourceList struct {
	Objects []runtime.Object `json:"objects"`
	Time    int64            `json:"time"`
}

func NewResourceList

func NewResourceList(objects []runtime.Object) *ResourceList

Jump to

Keyboard shortcuts

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