client

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2020 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildClient

func BuildClient() (err error)

func GetAllCRD

func GetAllCRD(namespace string, crd schema.GroupVersionResource) (result []model.KemtV1, err error)

func GetDeployments

func GetDeployments(ns string) []string

func GetDeploymentsDetail

func GetDeploymentsDetail(ns string) chan v12.Deployment

func GetEvents

func GetEvents(ns string) chan Event

func GetLogs

func GetLogs(ns, item string) (result chan string, err error, close func() error)

func GetNS

func GetNS() []string

func GetPods

func GetPods(ns string) []string

func WatchCRD

func WatchCRD(ns string, crd schema.GroupVersionResource) (err error, out chan WrappedKemtV1)

Types

type Event

type Event struct {
	EventType string `json:"Type"`
	Object    Object `json:"Object"`
}

func (Event) ToString

func (e Event) ToString() string

type InvolvedObject

type InvolvedObject struct {
	Kind      string `json:"kind"`
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
}

type Metadata

type Metadata struct {
	UID string `json:"uid"`
}

type Object

type Object struct {
	Metadata       Metadata       `json:"metadata"`
	InvolvedObject InvolvedObject `json:"involvedObject"`
	Reason         string         `json:"reason"`
	Message        string         `json:"message"`
	Type           string         `json:"type"`
	Count          int            `json:"count"`
	LastTimestamp  time.Time      `json:"lastTimeStamp"`
}

type TeamsClient

type TeamsClient struct {
	sync.Mutex

	Endpoint string
	// contains filtered or unexported fields
}

func NewTeamsClient

func NewTeamsClient(maxMessages, maxWaitSeconds int, endpoint string) *TeamsClient

func (*TeamsClient) EnqueueMsg

func (t *TeamsClient) EnqueueMsg(in string)

func (*TeamsClient) Start

func (t *TeamsClient) Start()

func (*TeamsClient) UpdateEndpoint

func (t *TeamsClient) UpdateEndpoint(e string)

type Webhook

type Webhook struct {
	Text       string `json:"text,omitempty"`
	Title      string `json:"title,omitempty"`
	ThemeColor string `json:"themeColor,omitempty"`
}

type WrappedKemtV1

type WrappedKemtV1 struct {
	Type string
	Kemt model.KemtV1
}

Jump to

Keyboard shortcuts

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