grapher

package
v0.0.0-...-67dd527 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderTable

func RenderTable(name string, duration time.Duration, keys []StartupTag) string

Types

type Grapher

type Grapher struct {
	// contains filtered or unexported fields
}

func New

func New(filterDuraton time.Duration) (*Grapher, error)

func (*Grapher) Close

func (g *Grapher) Close() error

func (*Grapher) Generate

func (g *Grapher) Generate() error

func (*Grapher) ParseText

func (g *Grapher) ParseText(jsonData []byte) (StartupResponse, error)

func (*Grapher) ParseURL

func (g *Grapher) ParseURL(url string) error

func (*Grapher) RenderDOT

func (g *Grapher) RenderDOT() (bytes.Buffer, error)

func (*Grapher) RenderPNGFile

func (g *Grapher) RenderPNGFile(filepath string) error

func (*Grapher) RenderSVGFile

func (g *Grapher) RenderSVGFile(filepath string) error

type StartupDuration

type StartupDuration struct {
	time.Duration
}

func (*StartupDuration) UnmarshalJSON

func (sd *StartupDuration) UnmarshalJSON(data []byte) error

This converts a Period Time string in the format "PT...S" into a time.Duration

type StartupEvent

type StartupEvent struct {
	StartTime   string          `json:"startTime"`
	EndTime     string          `json:"endTime"`
	Duration    StartupDuration `json:"duration"`
	StartupStep StartupStep     `json:"startupStep"`
}

type StartupResponse

type StartupResponse struct {
	SpringBootVersion string          `json:"springBootVersion"`
	Timeline          StartupTimeline `json:"timeline"`
}

type StartupStep

type StartupStep struct {
	Name     string       `json:"name"`
	ID       int          `json:"id"`
	ParentID int          `json:"parentID"`
	Tags     []StartupTag `json:"tags"`
}

type StartupTag

type StartupTag struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type StartupTimeline

type StartupTimeline struct {
	StartTime string         `json:"startTime"`
	Events    []StartupEvent `json:"events"`
}

Jump to

Keyboard shortcuts

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