link

package
v0.0.0-...-a06e19b Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFlowBytesTransfered

func GetFlowBytesTransfered(f *pbFlow.Flow) uint64

Types

type Link struct {
	Id              string
	SourceId        string
	DestinationId   string
	DestinationPort uint32

	// TODO: this is bad; create domain types for this fields
	Verdict     pbFlow.Verdict
	IPProtocol  ui.IPProtocol
	AuthType    pbFlow.AuthType
	IsEncrypted bool

	FlowAmount      uint64
	LatenciesNs     []uint64
	BytesTransfered uint64
	// contains filtered or unexported fields
}

func FromFlowProto

func FromFlowProto(f *pbFlow.Flow) *Link

func (*Link) AccumulateFlow

func (l *Link) AccumulateFlow(f *pbFlow.Flow)
func (l *Link) AccumulateLink(rhs *Link) *Link

func (*Link) DropStats

func (l *Link) DropStats() *Link

func (*Link) Equals

func (l *Link) Equals(rhs *Link) bool

func (*Link) IntoFlow

func (l *Link) IntoFlow() *pbFlow.Flow

func (*Link) String

func (l *Link) String() string

func (*Link) ToProto

func (l *Link) ToProto() *ui.ServiceLink

type Map

type Map map[string]*Link

func (Map) Has

func (m Map) Has(key string) bool
func (m Map) HasLink(l *Link) bool

func (Map) Insert

func (m Map) Insert(l *Link) *Link

func (Map) InsertMany

func (m Map) InsertMany(links ...*Link)

func (Map) ProtoValues

func (m Map) ProtoValues() []*ui.ServiceLink

func (Map) Values

func (m Map) Values() []*Link

Jump to

Keyboard shortcuts

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