Documentation ¶
Index ¶
- Variables
- func GetUserAgent() string
- func NewFrontClient(host string, cli akid.ClientID) *frontClientImpl
- func NewLearnClient(host string, cli akid.ClientID, svc akid.ServiceID) *learnClientImpl
- func SetAPIErrorHandler(f APIErrorHandler)
- type APIErrorHandler
- type CreateSpecOptions
- type FrontClient
- type GetSpecOptions
- type HTTPError
- type LearnClient
- type Service
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var Domain string
Global flag exposed by the root command. This doesn't *really* belong here, but previously it was buried in the "internal" package where we couldn't use it.
View Source
var ( // Shared client to maximize connection re-use. // TODO: make this private to the package once kgx package is removed. HTTPClient *retryablehttp.Client )
Functions ¶
func GetUserAgent ¶
func GetUserAgent() string
func NewFrontClient ¶
func NewLearnClient ¶
func SetAPIErrorHandler ¶ added in v0.21.9
func SetAPIErrorHandler(f APIErrorHandler)
Types ¶
type APIErrorHandler ¶ added in v0.21.9
Error handling (to call into the telemetry library without creating a circular dependency.)
type CreateSpecOptions ¶
type FrontClient ¶
type FrontClient interface { GetServices(context.Context) ([]Service, error) DaemonHeartbeat(ctx context.Context, daemonName string) error // Long-polls for changes to the set of active traces for a service. // Callers specify what they think the current set of active traces is. When // the cloud has a different set, this method returns options for capturing // new traces and a set of deactivated traces. An error is returned if the // connection is dropped (e.g., due to timing out). LongPollActiveTracesForService(context context.Context, daemonName string, serviceID akid.ServiceID, currentTraces []akid.LearnSessionID) (daemon.ActiveTraceDiff, error) }
type GetSpecOptions ¶
type GetSpecOptions struct {
EnableRelatedTypes bool
}
type LearnClient ¶
type LearnClient interface { ListLearnSessions(context.Context, akid.ServiceID, map[tags.Key]string) ([]*kgxapi.ListedLearnSession, error) ListLearnSessionsWithStats(context.Context, akid.ServiceID, int) ([]*kgxapi.ListedLearnSession, error) GetLearnSession(context.Context, akid.ServiceID, akid.LearnSessionID) (*kgxapi.LearnSession, error) CreateLearnSession(context.Context, *kgxapi.APISpecReference, string, map[tags.Key]string) (akid.LearnSessionID, error) // Uploads a batch of reports to Akita Cloud. This method is responsible for // filling in the ClientID in the given ReportsUploadRequest. AsyncReportsUpload(context.Context, akid.LearnSessionID, *kgxapi.UploadReportsRequest) error // Creates a spec from a set of learn sessions. CreateSpec(context.Context, string, []akid.LearnSessionID, CreateSpecOptions) (akid.APISpecID, error) GetSpec(context.Context, akid.APISpecID, GetSpecOptions) (kgxapi.GetSpecResponse, error) GetSpecVersion(context.Context, string) (kgxapi.APISpecVersion, error) UploadSpec(context.Context, kgxapi.UploadSpecRequest) (*kgxapi.UploadSpecResponse, error) // Resolve names. GetAPISpecIDByName(context.Context, string) (akid.APISpecID, error) GetLearnSessionIDByName(context.Context, string) (akid.LearnSessionID, error) // Spec diff GetSpecDiffTrie(context.Context, akid.APISpecID, akid.APISpecID) (*path_trie.PathTrie, error) // Telemetry PostClientPacketCaptureStats(context.Context, akid.ServiceID, string, kgxapi.PostClientPacketCaptureStatsRequest) error PostInitialClientTelemetry(context.Context, akid.ServiceID, string, kgxapi.PostInitialClientTelemetryRequest) error }
type User ¶ added in v0.21.9
type User = api_schema.UserResponse
Click to show internal directories.
Click to hide internal directories.