util

package
v0.17.4 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RandomAPIModelName func() string = randomName

Produces a random name for an API model.

View Source
var RandomLearnSessionName func() string = randomName

Produces a random name for a learning session.

Functions

func ContainsCLITraffic added in v0.16.5

func ContainsCLITraffic(t akinet.ParsedNetworkTraffic) bool

Detect Akita internal traffic

func DaemonHeartbeat added in v0.14.0

func DaemonHeartbeat(c rest.FrontClient, daemonName string) error

func GetLearnSessionByTags added in v0.16.5

func GetLearnSessionByTags(c rest.LearnClient, serviceID akid.ServiceID, tags map[tags.Key]string) (*kgxapi.ListedLearnSession, error)

func GetLearnSessionIDByName

func GetLearnSessionIDByName(c rest.LearnClient, name string) (akid.LearnSessionID, error)

func GetServiceIDByName

func GetServiceIDByName(c rest.FrontClient, name string) (akid.ServiceID, error)

func GetTraceURIByTags added in v0.16.5

func GetTraceURIByTags(domain string, clientID akid.ClientID, serviceName string, tags map[tags.Key]string, flagName string) (akiuri.URI, error)

Get the most recent trace for a service; helper method for commands to implement the --append-by-tag or --trace-tag flags.

func LongPollActiveTracesForService added in v0.14.0

func LongPollActiveTracesForService(c rest.FrontClient, daemonName string, serviceID akid.ServiceID, currentTraces []akid.LearnSessionID) (daemon.ActiveTraceDiff, error)

Long-polls the cloud for changes to the set of active traces for a service.

func NewLearnSession

func NewLearnSession(domain string, clientID akid.ClientID, svc akid.ServiceID, sessionName string, tags map[tags.Key]string, baseSpecRef *kgxapi.APISpecReference) (akid.LearnSessionID, error)

func ParseTags added in v0.17.4

func ParseTags(tagsArg []string) (map[tags.Key]string, error)

func ParseTagsAndWarn added in v0.17.4

func ParseTagsAndWarn(tagsArg []string) (map[tags.Key]string, error)

func ResolveSpecURI added in v0.12.0

func ResolveSpecURI(lc rest.LearnClient, uri akiuri.URI) (akid.APISpecID, error)

func WarnOnReservedTags added in v0.17.4

func WarnOnReservedTags(tagSet map[tags.Key]string)

Types

type ExitError

type ExitError struct {
	ExitCode int
	Err      error
}

func (ExitError) Error

func (ee ExitError) Error() string

Jump to

Keyboard shortcuts

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