apispec

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSpecURL added in v0.12.0

func GetSpecURL(domain string, svc akid.ServiceID, spec akid.APISpecID) url.URL

func ProcessHAR added in v0.12.0

func ProcessHAR(inboundCol, outboundCol trace.Collector, p string) error

Extract witnesses from a local HAR file and send them to the collector.

func ProcessHAREntry added in v0.12.0

func ProcessHAREntry(col trace.Collector, harUUID uuid.UUID, seqNum int, entry hl.CustomHAREntry, errs *sampled_err.Errors) bool

Processes a single entry from a HAR file. The UUID identifies the HAR file, whereas the seqNum identifies the entry within the file.

If any errors occur, the given Errors is updated, and false is returned. Otherwise, true is returned on success.

func Run

func Run(args Args) error

Types

type Args

type Args struct {
	// Required
	ClientID akid.ClientID
	Domain   string
	Traces   []location.Location

	// If unset, defaults to a randomly generated backend learn session.
	Out location.Location

	Service                    string
	Format                     string
	Tags                       map[tags.Key]string
	GetSpecEnableRelatedFields bool
	IncludeTrackers            bool
	PathParams                 []string
	PathExclusions             []string

	GitHubBranch string
	GitHubCommit string
	GitHubRepo   string
	GitHubPR     int

	GitLabMR *gitlab.MRInfo

	Plugins []plugin.AkitaPlugin
}

type ReconstructedTimestamps added in v0.12.0

type ReconstructedTimestamps struct {
	RequestStart  time.Time
	RequestEnd    time.Time
	ResponseStart time.Time
	ResponseEnd   time.Time
}

ReconstructedTimestamps holds times we can use to fill in a ParsedNetworkTraffic, in such a way that the reported latencies in the Witness will end up the same as in the HAR file. (Because I couldn't think of a good way to pass the measurements through the to two separate Process calls, without major refactoring.)

In the future, we could save these timestamps directly in a custom field, or pass the interval values through.

Jump to

Keyboard shortcuts

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