cmd

package module
v0.0.0-...-6484440 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEvents

func GetEvents(text string) (string, error)

GetEvents looks up a list of workflows from Tinkerbell's gRPC API for a given workflow's ID read from "text". If no workflow ID is given, then the latest updated workflow will be used instead

func GetWorkflow

func GetWorkflow(text string) (string, error)

GetWorkflow looks up a list of workflows from Tinkerbell's gRPC API

func QueryLogs

func QueryLogs(indexName, elkHost string) (string, error)

QueryLogs uses the ELK search API to fetch a recent number of logs for the index sent via indexName. Valid indicies are listed in the Kibana UI such as nginx, worker, tink-server

Types

type ElkSearchResponse

type ElkSearchResponse struct {
	Took int
	Hits struct {
		Total struct {
			Value int
		}
		Hits []struct {
			ID         string          `json:"_id"`
			Source     json.RawMessage `json:"_source"`
			Highlights json.RawMessage `json:"highlight"`
			Sort       []interface{}   `json:"sort"`
		}
	}
}

type Source

type Source struct {
	Timestamp *time.Time `json:"@timestamp"`
	Log       string     `json:"log"`
	Container string     `json:"container_name"`
}

type Workflows

type Workflows []*workflow.Workflow

func (Workflows) Len

func (s Workflows) Len() int

func (Workflows) Swap

func (s Workflows) Swap(i, j int)

Jump to

Keyboard shortcuts

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