keptn

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PluginName is the name of the Keptn Botkube plugin.
	PluginName = "keptn"
)

Variables

This section is empty.

Functions

func NewSource

func NewSource(version string) source.Source

NewSource returns a new instance of Source.

Types

type Client

type Client struct {
	// API refers to Keptn client. https://github.com/keptn/go-utils
	API *api.APISet
}

Client Keptn client

func NewClient

func NewClient(url, token string) (*Client, error)

NewClient initializes Keptn client

func (*Client) Events

func (c *Client) Events(ctx context.Context, request *GetEventsRequest) ([]Event, error)

Events returns only new events.

type Config

type Config struct {
	URL     string        `yaml:"url,omitempty"`
	Token   string        `yaml:"token,omitempty"`
	Project string        `yaml:"project,omitempty"`
	Service string        `yaml:"service,omitempty"`
	Log     config.Logger `yaml:"log,omitempty"`
}

Config prometheus configuration

func MergeConfigs

func MergeConfigs(configs []*source.Config) (Config, error)

MergeConfigs merges all input configuration.

type Data

type Data struct {
	Message string
	Project string
	Service string
	Status  string
	Stage   string
	Result  string
}

Data represents a Keptn event data which is used by plugin internally.

type Event

type Event struct {
	ID     string
	Source string
	Type   string
	Data   Data
}

Event represents a Keptn event returned from Keptn API.

func (*Event) ToAnonymizedEventDetails

func (e *Event) ToAnonymizedEventDetails() map[string]interface{}

ToAnonymizedEventDetails returns a map of event details which is used for telemetry purposes.

type GetEventsRequest

type GetEventsRequest struct {
	Project  string
	Service  string
	FromTime time.Time
}

GetEventsRequest represents a request to get events from Keptn.

type Source

type Source struct {
	source.HandleExternalRequestUnimplemented
	// contains filtered or unexported fields
}

Source prometheus source plugin data structure

func (*Source) Metadata

func (p *Source) Metadata(_ context.Context) (api.MetadataOutput, error)

Metadata returns metadata of Keptn configuration

func (*Source) Stream

func (p *Source) Stream(ctx context.Context, input source.StreamInput) (source.StreamOutput, error)

Stream streams Keptn events

Jump to

Keyboard shortcuts

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