Documentation ¶
Index ¶
- type APISpecReference
- type APISpecState
- type APISpecVersion
- type AgentResourceUsage
- type AgentResourceUsageData
- type ApidumpErrorType
- type CheckpointRequest
- type CheckpointResponse
- type CreateLearnSessionRequest
- type CreateSpecRequest
- type CreateSpecResponse
- type CreateTimeSpanSpecRequest
- type EndpointGroup
- type EndpointGroupAttributes
- type GetSpecMetadataResponse
- type GetSpecResponse
- type GraphResponse
- type HTTPGraphEdge
- type LearnMode
- type LearnSession
- type LearnSessionStats
- type LearnSessionTag
- type ListSessionsResponse
- type ListSpecsResponse
- type ListedLearnSession
- type NetworkDirection
- type PostClientPacketCaptureStatsRequest
- type PostInitialClientTelemetryRequest
- type SetSpecVersionRequest
- type SpecInfo
- type TCPConnectionReport
- type TCPGraphEdge
- type TLSGraphEdge
- type TLSHandshakeReport
- type Timeline
- type TimelineAggregation
- type TimelineEvent
- type TimelineResponse
- type TimelineValue
- type TimelineValues
- type UploadReportsRequest
- func (req *UploadReportsRequest) AddTCPConnectionReport(report *TCPConnectionReport)
- func (req *UploadReportsRequest) AddTLSHandshakeReport(report *TLSHandshakeReport)
- func (req *UploadReportsRequest) AddWitnessReport(report *WitnessReport)
- func (req *UploadReportsRequest) Clear()
- func (req *UploadReportsRequest) IsEmpty() bool
- func (req *UploadReportsRequest) SizeInBytes() int
- type UploadSpecRequest
- type UploadSpecResponse
- type UserResponse
- type WitnessReport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APISpecReference ¶
type APISpecReference struct { ID *akid.APISpecID `json:"id,omitempty"` Version *string `json:"version,omitempty"` }
References an API spec by ID or version. Only one field may be set.
type APISpecState ¶
type APISpecState string
const ( APISpecInitialized APISpecState = "INITIALIZED" APISpecComputing APISpecState = "COMPUTING" APISpecDone APISpecState = "DONE" APISpecError APISpecState = "ERROR" )
type APISpecVersion ¶
type APISpecVersion struct { Name string `pg:"name" json:"name"` APISpecID akid.APISpecID `pg:"api_spec_id" json:"api_spec_id"` ServiceID akid.ServiceID `pg:"service_id,type:uuid" json:"service_id"` CreationTime time.Time `pg:"creation_time" json:"creation_time"` // contains filtered or unexported fields }
Also used as a model in specs_db.
type AgentResourceUsage ¶
type AgentResourceUsage struct { // Peak usage data over the lifetime of the agent. Peak AgentResourceUsageData `json:"peak"` // Recent usage data over the interval defined by ObservedStartingAt and // ObservedDurationInSeconds. Recent AgentResourceUsageData `json:"recent"` // Time window in which recent resource usage was observed. This may be different // than the window specified in PostClientPacketCaptureStatsRequest. ObservedStartingAt time.Time `json:"observed_starting_at"` ObservedDurationInSeconds int `json:"observed_duration_in_seconds"` }
type AgentResourceUsageData ¶
type AgentResourceUsageData struct { // The number of CPU cores (or fractions thereof) the Akita agent used. CoresUsed float64 `json:"cpus_used"` // Akita agent CPU usage, as a percentage of total CPU availability. RelativeCPU float64 `json:"relative_cpu"` // Peak resident set size in kB. VmHWM uint64 `json:"vm_hwm"` }
type ApidumpErrorType ¶
type ApidumpErrorType string
const ( ApidumpError_PCAPPermission ApidumpErrorType = "PCAP permission failure" // Cannot obtain permission for packet capture // Cannot access network interface due to "Function not implemented" error. // Often indicates the agent was built for a different architecture and is // running in a partially emulated environment. ApidumpError_PCAPInterfaceNotImplemented ApidumpErrorType = "PCAP interface not implemented" ApidumpError_PCAPInterfaceOther ApidumpErrorType = "Other PCAP interface failure" // Cannot access interface for packet capture ApidumpError_InvalidFilters ApidumpErrorType = "Invalid filters" // Error parsing filters ApidumpError_TraceCreation ApidumpErrorType = "Trace creation failure" // Can't create learn session ApidumpError_Other ApidumpErrorType = "Other error" )
type CheckpointRequest ¶
type CheckpointRequest struct { // Optional: name to assign to the API spec generated by the checkpoint. APISpecName string `json:"api_spec_name"` }
type CheckpointResponse ¶
type CreateLearnSessionRequest ¶
type CreateLearnSessionRequest struct { // Optional argument that specifies an existing API spec that specs generated // from this learn session should extend upon. BaseAPISpecRef *APISpecReference `json:"base_api_spec_ref,omitempty"` // Optional key-value pairs to tag this learn session. // We reserve tags with "x-akita-" prefix for internal use. Tags tags.SingletonTags `json:"tags,omitempty"` // Optional name for the learn session. Name string `json:"name"` }
type CreateSpecRequest ¶
type CreateSpecRequest struct { // Learn sessions to create spec from. LearnSessionIDs []akid.LearnSessionID `json:"learn_session_ids"` // Optional: name to assign to the API spec generated by the checkpoint. Name string `json:"name"` // Optional: user-specified tags. Tags tags.SingletonTags `json:"tags"` }
type CreateSpecResponse ¶
type CreateTimeSpanSpecRequest ¶
type CreateTimeSpanSpecRequest struct { Deployment string `json:"deployment"` TimeSpan time_span.HalfOpenInterval `json:"time_span"` }
type EndpointGroup ¶
type EndpointGroup struct { Method http_rest_methods.HTTPMethod `json:"method,omitempty"` Host endpoints.Host `json:"host,omitempty"` PathTemplate endpoints.PathTemplate `json:"path_template,omitempty"` }
Describes a group of endpoints. If a non-default value is provided for any attribute in this struct, then all endpoints in the group will have that value for that attribute.
type EndpointGroupAttributes ¶
type EndpointGroupAttributes struct { EndpointGroup ResponseCode int `json:"response_code,omitempty"` }
Describes a common set of attributes for a group of endpoints. If a non-default value (i.e., non-empty string or non-zero int) is provided for any attribute in this struct, then all endpoints in the group will have that value for that attribute.
XXX Would be nice for this to just be map[attribute]string, but then we wouldn't be able to use this as a map key.
type GetSpecMetadataResponse ¶
type GetSpecMetadataResponse struct { Name string `json:"name"` State APISpecState `json:"state"` // Deprecated in favor of TagsSet, which supports multiple values // per tag. Tags tags.SingletonTags `json:"tags,omitempty"` TagsSet tags.Tags `json:"tags_set,omitempty"` }
type GetSpecResponse ¶
type GetSpecResponse struct { Content string `json:"content"` // TODO: remove // If the spec was created from a learn session, the session's ID is included. LearnSessionID *akid.LearnSessionID `json:"learn_session_id,omitempty"` // If the spec was created from a learn session, the session's ID is included. // If the spec was created by merging other API specs, those spec's session // IDs are included. LearnSessionIDs []akid.LearnSessionID `json:"learn_session_ids,omitempty"` Name string `json:"name"` State APISpecState `json:"state"` // Deprecated in favor of TagsSet, which supports multiple values // per tag. Tags tags.SingletonTags `json:"tags,omitempty"` TagsSet tags.Tags `json:"tags_set,omitempty"` }
type GraphResponse ¶
type GraphResponse struct { // Graph edges representing HTTP requests and responses. HTTPEdges []HTTPGraphEdge `json:"edges"` // Graph edges representing TCP connections. TCPEdges []TCPGraphEdge `json:"tcp_edges"` // Graph edges representing TLS connections. TLSEdges []TLSGraphEdge `json:"tls_edges"` }
func (*GraphResponse) IsEmpty ¶
func (g *GraphResponse) IsEmpty() bool
func (*GraphResponse) NumEdges ¶
func (g *GraphResponse) NumEdges() int
type HTTPGraphEdge ¶
type HTTPGraphEdge struct { // Describe the source and destination vertices by the attributes // they share in common: either just Host for a service-level vertex, // or Host + Method + PathTemplate for a end-point level vertex, although // we could imagine other possibilities. SourceAttributes EndpointGroupAttributes `json:"source_attrs"` TargetAttributes EndpointGroupAttributes `json:"target_attrs"` // Aggregate values attached to the edge, e.g., "count" Values map[TimelineValue]float32 `json:"values"` }
An HTTP request and response between two nodes in a graph.
type LearnSession ¶
type LearnSession struct { ID akid.LearnSessionID `json:"id"` Name string `json:"name"` IdentityID akid.IdentityID `json:"identity_id"` ServiceID akid.ServiceID `json:"service_id"` CreationTime time.Time `json:"creation_time"` // Optional field whose presence indicates that the learn session is an // extension to an existing API spec. BaseAPISpecID *akid.APISpecID `json:"base_api_spec_id,omitempty"` // HasMany relationship. Tags []LearnSessionTag `json:"tags"` }
func NewLearnSession ¶
func NewLearnSession( ID akid.LearnSessionID, Name string, IdentityID akid.IdentityID, ServiceID akid.ServiceID, CreationTime time.Time, BaseAPISpecID *akid.APISpecID, Tags []LearnSessionTag, ) *LearnSession
type LearnSessionStats ¶
type LearnSessionStats struct { // The number of witnesses in this learn session. NumWitnesses int `json:"num_witnesses"` }
Statistics about a single learn session.
func NewLearnSessionStats ¶
func NewLearnSessionStats(NumWitnesses int) *LearnSessionStats
type LearnSessionTag ¶
type LearnSessionTag struct { LearnSessionID akid.LearnSessionID `pg:"learn_session_id,type:uuid" json:"learn_session_id"` Key tags.Key `pg:"key" json:"key"` Value string `pg:"value,use_zero" json:"value"` // contains filtered or unexported fields }
type ListSessionsResponse ¶
type ListSessionsResponse struct {
Sessions []*ListedLearnSession `json:"sessions"`
}
type ListSpecsResponse ¶
type ListedLearnSession ¶
type ListedLearnSession struct { ID akid.LearnSessionID `json:"id"` Name string `json:"name"` IdentityID akid.IdentityID `json:"identity_id"` ServiceID akid.ServiceID `json:"service_id"` CreationTime time.Time `json:"creation_time"` MinClientWitnessTime optionals.Optional[time.Time] `json:"min_client_witness_time"` MaxClientWitnessTime optionals.Optional[time.Time] `json:"max_client_witness_time"` // Optional field whose presence indicates that the learn session is an // extension to an existing API spec. BaseAPISpecID *akid.APISpecID `json:"base_api_spec_id,omitempty"` // HasMany relationship. Tags []LearnSessionTag `json:"tags"` // Identifies the set of API specs that are derived from this learn session. APISpecs []akid.APISpecID `json:"api_spec_ids"` Stats *LearnSessionStats `json:"stats,omitempty"` }
An extended version of LearnSession that includes extra information for presentation in the web console when listing learn sessions. XXX Should inherit from LearnSession, but Go. :(
func NewListedLearnSession ¶
func NewListedLearnSession( ID akid.LearnSessionID, Name string, IdentityID akid.IdentityID, ServiceID akid.ServiceID, CreationTime time.Time, MinClientWitnessTime optionals.Optional[time.Time], MaxClientWitnessTime optionals.Optional[time.Time], BaseAPISpecID *akid.APISpecID, Tags []LearnSessionTag, APISpecs []akid.APISpecID, Stats *LearnSessionStats, ) *ListedLearnSession
type NetworkDirection ¶
type NetworkDirection string
NetworkDirection is always relative to subject service.
const (
Inbound NetworkDirection = "INBOUND"
)
type PostClientPacketCaptureStatsRequest ¶
type PostClientPacketCaptureStatsRequest struct { ClientID akid.ClientID `json:"client_id"` ObservedStartingAt time.Time `json:"observed_starting_at"` ObservedDurationInSeconds int `json:"observed_duration_in_seconds"` // If PacketCountSummary is absent, then this observation period has // started but not yet concluded. PacketCountSummary *client_telemetry.PacketCountSummary `json:"packet_count_summary,omitempty"` // Report on any errors encounted during apidump that should be shown to the user. ApidumpError ApidumpErrorType `json:"apidump_error,omitempty"` ApidumpErrorText string `json:"apidump_error_text,omitempty"` // Report CPU and memory usage, if available. AgentResourceUsage *AgentResourceUsage `json:"agent_resource_usage,omitempty"` }
type PostInitialClientTelemetryRequest ¶
type PostInitialClientTelemetryRequest struct { ClientID akid.ClientID `json:"client_id"` ObservedStartingAt time.Time `json:"observed_starting_at"` ObservedDurationInSeconds int `json:"observed_duration_in_seconds"` CLIVersion string `json:"cli_version"` CLITargetArch string `json:"cli_target_arch"` // True when the CLI is running in a Docker container distributed by Akita, // e.g. akitasoftware/cli:latest on Docker Hub. AkitaDockerRelease bool `json:"akita_docker_release"` // True when the host.docker.internal DNS name resolves, which indicates the // CLI is running in a docker container hosted on Docker Desktop. DockerDesktop bool `json:"docker_desktop"` }
type SetSpecVersionRequest ¶
type SpecInfo ¶
type SpecInfo struct { ID akid.APISpecID `json:"id"` Name string `json:"name,omitempty"` // Deprecated in favor of TagsSet, which supports multiple values // per tag. Tags tags.SingletonTags `json:"tags,omitempty"` TagsSet tags.Tags `json:"tags_set,omitempty"` VersionTags []string `json:"version_tags,omitempty"` CreationTime time.Time `json:"creation_time"` EditTime time.Time `json:"edit_time"` State APISpecState `json:"state"` // Model and trace statistics // Number of endpoints. NumEndpoints int `json:"num_endpoints,omitempty"` // Deployment times TraceStartTime *time.Time `json:"trace_start_time,omitempty"` TraceEndTime *time.Time `json:"trace_end_time,omitempty"` }
Types used in spec list
type TCPConnectionReport ¶
type TCPConnectionReport struct { ID akid.ConnectionID `json:"id"` SrcAddr net.IP `json:"src_addr"` SrcPort uint16 `json:"src_port"` DestAddr net.IP `json:"dest_addr"` DestPort uint16 `json:"dest_port"` FirstObserved time.Time `json:"first_observed"` LastObserved time.Time `json:"last_observed"` // If true, source is known to have initiated the connection. Otherwise, // "source" and "destination" is arbitrary. InitiatorKnown bool `json:"initiator_known"` // Whether and how the connection was closed. EndState akinet.TCPConnectionEndState `json:"end_state"` }
Details about a TCP connection that was observed.
func (TCPConnectionReport) GetID ¶
func (report TCPConnectionReport) GetID() akid.ID
func (*TCPConnectionReport) SizeInBytes ¶
func (report *TCPConnectionReport) SizeInBytes() int
Returns an approximation of the size of this report.
type TCPGraphEdge ¶
type TCPGraphEdge struct { Source string `json:"source"` Target string `json:"target"` // If true, the source is known to have initiated the connection. Otherwise, // the "source" and "target" designations are chosen so that `source` <= // `target`. One way to render this is to use a directed edge if // "InitiatorKnown" is true, and an undirected edge if false. InitiatorKnown bool `json:"initiator_known"` // Aggregate values attached to the edge, e.g., "count" Values map[TimelineValue]float32 `json:"values"` }
Represents a TCP connection between two nodes in a graph.
type TLSGraphEdge ¶
type TLSGraphEdge struct { Source string `json:"source"` Target string `json:"target"` TLSVersion akinet.TLSVersion `json:"tls_version"` NegotiatedApplicationProtocol *string `json:"negotiated_application_protocol"` // Aggregate values attached to the edge, e.g., "count" Values map[TimelineValue]float32 `json:"values"` }
Represents a TLS connection between two nodes in a graph.
type TLSHandshakeReport ¶
type TLSHandshakeReport struct { ID akid.ConnectionID `json:"id"` // The inferred TLS version. Only populated if the Server Hello was seen. Version *akinet.TLSVersion // The DNS hostname extracted from the client's SNI extension, if any. SNIHostname *string // The list of protocols supported by the client, as seen in the ALPN // extension. SupportedProtocols []string // The selected application-layer protocol, as seen in the server's ALPN // extension, if any. SelectedProtocol *string // The SANs seen in the server's certificate. The server's certificate is // encrypted in TLS 1.3, so this is only populated for TLS 1.2 connections. SubjectAlternativeNames []string }
Details about a TLS handshake that was observed.
func (*TLSHandshakeReport) SizeInBytes ¶
func (report *TLSHandshakeReport) SizeInBytes() int
Returns an approximation of the size of this report.
type Timeline ¶
type Timeline struct { // Describes the common set of attributes for the endpoints in this timeline. GroupAttributes EndpointGroupAttributes `json:"group_attrs"` // Events in time order Events []TimelineEvent `json:"events"` }
type TimelineAggregation ¶
type TimelineAggregation string
const ( Aggr_Count TimelineAggregation = "count" // count of events within bucket Aggr_Count_4XX TimelineAggregation = "count_4xx" // count of HTTP events with a 4XX status code Aggr_Count_5XX TimelineAggregation = "count_5xx" // count of HTTP events with a 5XX status code Aggr_Count_Error TimelineAggregation = "count_error" // count of HTTP events with an error status code Aggr_Fraction_4XX TimelineAggregation = "fraction_4xx" // fraction of HTTP events that have a 4XX status code Aggr_Fraction_5XX TimelineAggregation = "fraction_5xx" // fraction of HTTP events that have a 5XX status code Aggr_Fraction_Error TimelineAggregation = "fraction_error" // fraction of HTTP events that have an error status code Aggr_Rate TimelineAggregation = "rate" // rate in events per minute Aggr_Max TimelineAggregation = "max" // max of latency and RTT Aggr_Min TimelineAggregation = "min" // min of latency and RTT Aggr_Mean TimelineAggregation = "mean" // arithmetic mean of latency and RTT Aggr_Median TimelineAggregation = "median" // median value of latency and RTT Aggr_90p TimelineAggregation = "90p" // 90th percentile latency and RTT Aggr_95p TimelineAggregation = "95p" // 95th percentile latency and RTT Aggr_99p TimelineAggregation = "99p" // 99th percentile latency and RTT Aggr_999p TimelineAggregation = "99.9p" // 99.9th percentile latency and RTT Aggr_Seen_Times TimelineAggregation = "seen_times" // first and last seen times )
These arguments may be given as the "aggregate" query parameter. They correspond with the keys in the response below.
type TimelineEvent ¶
type TimelineEvent struct { Time time.Time `json:"time"` Values TimelineValues `json:"values"` }
Time along with a map of values such as count, latency, etc.
type TimelineResponse ¶
type TimelineResponse struct { // Report what time range is included in this responses; less than // request if data is not available or limit was hit. ActualStartTime time.Time `json:"actual_start_time"` ActualEndTime time.Time `json:"actual_end_time"` // One timeline per selected endpoint Timelines []Timeline `json:"timelines"` // If incomplete due to limit, the first unreported start time NextStartTime *time.Time `json:"next_start_time,omitempty"` // Time spans that have incomplete data. IncompleteSpans []time_span.HalfOpenInterval `json:"incomplete_spans,omitempty"` }
type TimelineValue ¶
type TimelineValue string
const ( Event_Count TimelineValue = "count" // count of events within bucket Event_Rate TimelineValue = "rate" // rate in events per minute Event_Latency TimelineValue = "latency" // processing latency in milliseconds Event_Latency_Max TimelineValue = "latency_max" // maximum latency Event_Latency_Min TimelineValue = "latency_min" // minimum latency Event_Latency_Mean TimelineValue = "latency_mean" // arithmetic mean latency Event_Latency_Median TimelineValue = "latency_median" // median (50th percentile) latency Event_Latency_90p TimelineValue = "latency_90p" // 90th percentile latency Event_Latency_95p TimelineValue = "latency_95p" // 95th percentile latency Event_Latency_99p TimelineValue = "latency_99p" // 99th percentile latency Event_Latency_999p TimelineValue = "latency_99.9p" // 99.9th percentile latency Event_RTT TimelineValue = "rtt" // estimated network round-trip time, in milliseconds Event_RTT_Max TimelineValue = "rtt_max" // maximum rtt Event_RTT_Min TimelineValue = "rtt_min" // minimum rtt Event_RTT_Mean TimelineValue = "rtt_mean" // arithmetic mean rtt Event_RTT_Median TimelineValue = "rtt_median" // median (50th percentile) rtt Event_RTT_90p TimelineValue = "rtt_90p" // 90th percentile rtt Event_RTT_95p TimelineValue = "rtt_95p" // 95th percentile rtt Event_RTT_99p TimelineValue = "rtt_99p" // 99th percentile rtt Event_RTT_999p TimelineValue = "rtt_99.9p" // 99.9th percentile rtt Event_Latency_1ms_Count TimelineValue = "latency_1ms_count" // Count of events with latency <=1ms Event_Latency_10ms_Count TimelineValue = "latency_10ms_count" // Count of events with latency >1ms and <=10ms Event_Latency_100ms_Count TimelineValue = "latency_100ms_count" // Count of events with latency >10ms and <=100ms Event_Latency_1000ms_Count TimelineValue = "latency_1000ms_count" // Count of events with latency >100ms and <=1s Event_Latency_Inf_Count TimelineValue = "latency_inf_count" // Count of events with latency >1 second )
These are the available keys for Timeline.Values.
type TimelineValues ¶
type TimelineValues struct { NumEvents *int `json:"count,omitempty"` EventsPerMinute *float32 `json:"rate,omitempty"` MaxLatency *float32 `json:"latency_max,omitempty"` MinLatency *float32 `json:"latency_min,omitempty"` MeanLatency *float32 `json:"latency_mean,omitempty"` MedianLatency *float32 `json:"latency_median,omitempty"` P90Latency *float32 `json:"latency_90p,omitempty"` P95Latency *float32 `json:"latency_95p,omitempty"` P99Latency *float32 `json:"latency_99p,omitempty"` P999Latency *float32 `json:"latency_99.9p,omitempty"` MaxRTT *float32 `json:"rtt_max,omitempty"` MinRTT *float32 `json:"rtt_min,omitempty"` MeanRTT *float32 `json:"rtt_mean,omitempty"` MedianRTT *float32 `json:"rtt_median,omitempty"` P90RTT *float32 `json:"rtt_90p,omitempty"` P95RTT *float32 `json:"rtt_95p,omitempty"` P99RTT *float32 `json:"rtt_99p,omitempty"` P999RTT *float32 `json:"rtt_99.9p,omitempty"` Num4xx *int `json:"num_4xx,omitempty"` // The number of calls that resulted in a 4XX response. Fraction4xx *float32 `json:"fraction_4xx,omitempty"` // The fraction of calls that resulted in a 4XX response. Num5xx *int `json:"num_5xx,omitempty"` // The number of calls that resulted in a 5XX response. Fraction5xx *float32 `json:"fraction_5xx,omitempty"` // The fraction of calls that resulted in a 5XX response. NumErrors *int `json:"num_errors,omitempty"` // The number of calls that resulted in an error response. FractionErrors *float32 `json:"fraction_errors,omitempty"` // The fraction of calls that resulted in an error response. FirstSeen *time.Time `json:"first_seen,omitempty"` // The first time an event was seen. LastSeen *time.Time `json:"last_seen,omitempty"` // The last time an event was seen. }
Tracks summary statistics for a group of events, as derived from an EndpointStats object. Each statistic is optionally populated.
type UploadReportsRequest ¶
type UploadReportsRequest struct { ClientID akid.ClientID `json:"client_id"` Witnesses []*WitnessReport `json:"witnesses"` TCPConnections []*TCPConnectionReport `json:"tcp_connections"` TLSHandshakes []*TLSHandshakeReport `json:"tls_handshakes"` // contains filtered or unexported fields }
func (*UploadReportsRequest) AddTCPConnectionReport ¶
func (req *UploadReportsRequest) AddTCPConnectionReport(report *TCPConnectionReport)
func (*UploadReportsRequest) AddTLSHandshakeReport ¶
func (req *UploadReportsRequest) AddTLSHandshakeReport(report *TLSHandshakeReport)
func (*UploadReportsRequest) AddWitnessReport ¶
func (req *UploadReportsRequest) AddWitnessReport(report *WitnessReport)
func (*UploadReportsRequest) Clear ¶
func (req *UploadReportsRequest) Clear()
Removes all reports from this request.
func (*UploadReportsRequest) IsEmpty ¶
func (req *UploadReportsRequest) IsEmpty() bool
func (*UploadReportsRequest) SizeInBytes ¶
func (req *UploadReportsRequest) SizeInBytes() int
Returns an approximation of the size of this request.
type UploadSpecRequest ¶
type UploadSpecRequest struct { Name string `json:"name"` Tags tags.SingletonTags `json:"tags,omitempty"` // TODO(kku): use multipart/form-data upload once we can support it. Content string `json:"content"` }
type UploadSpecResponse ¶
type UserResponse ¶
type WitnessReport ¶
type WitnessReport struct { // CLI v0.20.0 and later will only ever provide "INBOUND" reports. Anything // marked "OUTBOUND" is ignored by the Akita back end. Direction NetworkDirection `json:"direction"` OriginAddr net.IP `json:"origin_addr"` OriginPort uint16 `json:"origin_port"` DestinationAddr net.IP `json:"destination_addr"` DestinationPort uint16 `json:"destination_port"` ClientWitnessTime time.Time `json:"client_witness_time"` // A serialized Witness protobuf in base64 URL encoded format. WitnessProto string `json:"witness_proto"` ID akid.WitnessID `json:"id"` // Hash of the witness proto. Only used internally in the client. Hash string `json:"-"` }
func (*WitnessReport) SizeInBytes ¶
func (report *WitnessReport) SizeInBytes() int
Returns an approximation of the size of this report.