kiali

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Edge

type Edge struct {
	ID      string `json:"id"`
	Source  string `json:"source"`
	Target  string `json:"target"`
	Traffic struct {
		Protocol string `json:"protocol"`
		Rates    struct {
			HTTP           string `json:"http"`
			HTTPPercentReq string `json:"httpPercentReq"`
		} `json:"rates"`
		Responses struct {
			Num202 struct {
				Flags interface{} `json:"flags"`
				Hosts interface{} `json:"hosts"`
			} `json:"202"`
		} `json:"responses"`
	} `json:"traffic"`
}

func (*Edge) HasSources

func (e *Edge) HasSources(ids ...string) bool

func (*Edge) HasTargets

func (e *Edge) HasTargets(ids ...string) bool

type Edges

type Edges []*Edge

func (Edges) Inbound

func (e Edges) Inbound(n *Node) []string

func (Edges) Outbound

func (e Edges) Outbound(n *Node) []string

type Graph

type Graph struct {
	Timestamp int    `json:"timestamp"`
	Duration  int    `json:"duration"`
	GraphType string `json:"graphType"`
	Elements  struct {
		Nodes []struct {
			Data *Node `json:"data"`
		} `json:"nodes"`
		Edges []struct {
			Data *Edge `json:"data"`
		} `json:"edges"`
	} `json:"elements"`
}

func LoadGraphInfo

func LoadGraphInfo(ns ...string) (*Graph, error)

func (*Graph) GetEdges

func (g *Graph) GetEdges() Edges

func (*Graph) GetNodes

func (g *Graph) GetNodes() Nodes

func (*Graph) Inbound

func (g *Graph) Inbound(n *Node) Nodes

func (*Graph) Outbound

func (g *Graph) Outbound(n *Node) Nodes

type Node

type Node struct {
	Workload string `json:"workload"`
	App      string `json:"app"`
	Version  string `json:"version"`
	Traffic  []struct {
		Protocol string `json:"protocol"`
		Rates    struct {
			HTTPIn  string `json:"httpIn"`
			HTTPOut string `json:"httpOut"`
			TCPOut  string `json:"tcpOut"`
		} `json:"rates,omitempty"`
	} `json:"traffic"`
	ID           string `json:"id"`
	NodeType     string `json:"nodeType"`
	Namespace    string `json:"namespace"`
	Service      string `json:"service"`
	DestServices []struct {
		Namespace string `json:"namespace"`
		Name      string `json:"name"`
	} `json:"destServices"`
	IsServiceEntry string `json:"isServiceEntry"`
}

func (*Node) GetName

func (n *Node) GetName() string

func (*Node) Selector

func (n *Node) Selector() string

type Nodes

type Nodes map[string]*Node

func (Nodes) FullNames

func (n Nodes) FullNames() []string

func (Nodes) Get

func (n Nodes) Get(name string) *Node

func (Nodes) Join

func (n Nodes) Join(o Nodes) Nodes

func (Nodes) SelectOne

func (n Nodes) SelectOne() (*Node, error)

Jump to

Keyboard shortcuts

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