telemetryv1

package
v0.1.0-rc.49 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: BSD-3-Clause Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package telemetryv1 provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.2 DO NOT EDIT.

Index

Constants

View Source
const MaximumBatchBytes = 64 << 10
View Source
const MaximumEventBytes = 16 << 10

Variables

View Source
var ErrInvalid = errors.New("telemetry does not match the v1 contract")

Functions

func ValidateBatch

func ValidateBatch(data []byte) error

func ValidateClient

func ValidateClient(data []byte) error

func ValidateCollectedEvent

func ValidateCollectedEvent(data []byte) error

func ValidateEvent

func ValidateEvent(data []byte) error

Types

type Batch

type Batch struct {
	Events         []CollectedEvent   `json:"events"`
	InstallationId string             `json:"installation_id"`
	SchemaVersion  BatchSchemaVersion `json:"schema_version"`
}

Batch defines model for Batch.

type BatchSchemaVersion

type BatchSchemaVersion int

BatchSchemaVersion defines model for Batch.SchemaVersion.

const (
	BatchSchemaVersionN1 BatchSchemaVersion = 1
)

Defines values for BatchSchemaVersion.

func (BatchSchemaVersion) Valid

func (e BatchSchemaVersion) Valid() bool

Valid indicates whether the value is a known member of the BatchSchemaVersion enum.

type Client

type Client struct {
	Arch    ClientArch `json:"arch"`
	Ci      bool       `json:"ci"`
	Os      ClientOs   `json:"os"`
	Version string     `json:"version"`
}

Client defines model for Client.

type ClientArch

type ClientArch string

ClientArch defines model for Client.Arch.

const (
	ClientArchAmd64 ClientArch = "amd64"
	ClientArchArm64 ClientArch = "arm64"
	ClientArchOther ClientArch = "other"
)

Defines values for ClientArch.

func (ClientArch) Valid

func (e ClientArch) Valid() bool

Valid indicates whether the value is a known member of the ClientArch enum.

type ClientOs

type ClientOs string

ClientOs defines model for Client.Os.

const (
	ClientOsDarwin  ClientOs = "darwin"
	ClientOsLinux   ClientOs = "linux"
	ClientOsOther   ClientOs = "other"
	ClientOsWindows ClientOs = "windows"
)

Defines values for ClientOs.

func (ClientOs) Valid

func (e ClientOs) Valid() bool

Valid indicates whether the value is a known member of the ClientOs enum.

type CollectedEvent

type CollectedEvent struct {
	Client Client `json:"client"`
	Event  Event  `json:"event"`
}

CollectedEvent defines model for CollectedEvent.

type CommandEvent

type CommandEvent struct {
	EventId      EventID                  `json:"event_id"`
	EventVersion CommandEventEventVersion `json:"event_version"`
	Name         CommandEventName         `json:"name"`
	Payload      CommandOutcome           `json:"payload"`
}

CommandEvent defines model for CommandEvent.

type CommandEventEventVersion

type CommandEventEventVersion int

CommandEventEventVersion defines model for CommandEvent.EventVersion.

const (
	CommandEventEventVersionN1 CommandEventEventVersion = 1
)

Defines values for CommandEventEventVersion.

func (CommandEventEventVersion) Valid

func (e CommandEventEventVersion) Valid() bool

Valid indicates whether the value is a known member of the CommandEventEventVersion enum.

type CommandEventName

type CommandEventName string

CommandEventName defines model for CommandEvent.Name.

const (
	CommandEventNameCommandOutcome CommandEventName = "command.outcome"
)

Defines values for CommandEventName.

func (CommandEventName) Valid

func (e CommandEventName) Valid() bool

Valid indicates whether the value is a known member of the CommandEventName enum.

type CommandOutcome

type CommandOutcome struct {
	Action         *CommandOutcomeAction       `json:"action,omitempty"`
	Command        CommandOutcomeCommand       `json:"command"`
	DiagnosticCode *string                     `json:"diagnostic_code,omitempty"`
	FailureStage   *CommandOutcomeFailureStage `json:"failure_stage,omitempty"`
	Outcome        Outcome                     `json:"outcome"`
}

CommandOutcome defines model for CommandOutcome.

type CommandOutcomeAction

type CommandOutcomeAction string

CommandOutcomeAction defines model for CommandOutcome.Action.

const (
	CommandOutcomeActionAccept    CommandOutcomeAction = "accept"
	CommandOutcomeActionAdd       CommandOutcomeAction = "add"
	CommandOutcomeActionAllow     CommandOutcomeAction = "allow"
	CommandOutcomeActionBlock     CommandOutcomeAction = "block"
	CommandOutcomeActionCheck     CommandOutcomeAction = "check"
	CommandOutcomeActionCreate    CommandOutcomeAction = "create"
	CommandOutcomeActionCurrent   CommandOutcomeAction = "current"
	CommandOutcomeActionDelete    CommandOutcomeAction = "delete"
	CommandOutcomeActionDrain     CommandOutcomeAction = "drain"
	CommandOutcomeActionGenerate  CommandOutcomeAction = "generate"
	CommandOutcomeActionGet       CommandOutcomeAction = "get"
	CommandOutcomeActionInspect   CommandOutcomeAction = "inspect"
	CommandOutcomeActionInstall   CommandOutcomeAction = "install"
	CommandOutcomeActionJoin      CommandOutcomeAction = "join"
	CommandOutcomeActionLeave     CommandOutcomeAction = "leave"
	CommandOutcomeActionList      CommandOutcomeAction = "list"
	CommandOutcomeActionMembers   CommandOutcomeAction = "members"
	CommandOutcomeActionOther     CommandOutcomeAction = "other"
	CommandOutcomeActionPath      CommandOutcomeAction = "path"
	CommandOutcomeActionRelease   CommandOutcomeAction = "release"
	CommandOutcomeActionRemove    CommandOutcomeAction = "remove"
	CommandOutcomeActionReopen    CommandOutcomeAction = "reopen"
	CommandOutcomeActionReply     CommandOutcomeAction = "reply"
	CommandOutcomeActionResolve   CommandOutcomeAction = "resolve"
	CommandOutcomeActionRevoke    CommandOutcomeAction = "revoke"
	CommandOutcomeActionSet       CommandOutcomeAction = "set"
	CommandOutcomeActionSetRole   CommandOutcomeAction = "set-role"
	CommandOutcomeActionShow      CommandOutcomeAction = "show"
	CommandOutcomeActionStart     CommandOutcomeAction = "start"
	CommandOutcomeActionStatus    CommandOutcomeAction = "status"
	CommandOutcomeActionStop      CommandOutcomeAction = "stop"
	CommandOutcomeActionUninstall CommandOutcomeAction = "uninstall"
	CommandOutcomeActionUpdate    CommandOutcomeAction = "update"
	CommandOutcomeActionUse       CommandOutcomeAction = "use"
	CommandOutcomeActionWatch     CommandOutcomeAction = "watch"
)

Defines values for CommandOutcomeAction.

func (CommandOutcomeAction) Valid

func (e CommandOutcomeAction) Valid() bool

Valid indicates whether the value is a known member of the CommandOutcomeAction enum.

type CommandOutcomeCommand

type CommandOutcomeCommand string

CommandOutcomeCommand defines model for CommandOutcome.Command.

const (
	CommandOutcomeCommandAdmin     CommandOutcomeCommand = "admin"
	CommandOutcomeCommandAlias     CommandOutcomeCommand = "alias"
	CommandOutcomeCommandApply     CommandOutcomeCommand = "apply"
	CommandOutcomeCommandConfig    CommandOutcomeCommand = "config"
	CommandOutcomeCommandConnect   CommandOutcomeCommand = "connect"
	CommandOutcomeCommandDomain    CommandOutcomeCommand = "domain"
	CommandOutcomeCommandFeedback  CommandOutcomeCommand = "feedback"
	CommandOutcomeCommandInit      CommandOutcomeCommand = "init"
	CommandOutcomeCommandInspect   CommandOutcomeCommand = "inspect"
	CommandOutcomeCommandLogin     CommandOutcomeCommand = "login"
	CommandOutcomeCommandLogout    CommandOutcomeCommand = "logout"
	CommandOutcomeCommandOther     CommandOutcomeCommand = "other"
	CommandOutcomeCommandPublish   CommandOutcomeCommand = "publish"
	CommandOutcomeCommandPublisher CommandOutcomeCommand = "publisher"
	CommandOutcomeCommandShare     CommandOutcomeCommand = "share"
	CommandOutcomeCommandStatus    CommandOutcomeCommand = "status"
	CommandOutcomeCommandTeam      CommandOutcomeCommand = "team"
	CommandOutcomeCommandUrl       CommandOutcomeCommand = "url"
	CommandOutcomeCommandWait      CommandOutcomeCommand = "wait"
	CommandOutcomeCommandWatch     CommandOutcomeCommand = "watch"
	CommandOutcomeCommandWebhook   CommandOutcomeCommand = "webhook"
)

Defines values for CommandOutcomeCommand.

func (CommandOutcomeCommand) Valid

func (e CommandOutcomeCommand) Valid() bool

Valid indicates whether the value is a known member of the CommandOutcomeCommand enum.

type CommandOutcomeFailureStage

type CommandOutcomeFailureStage string

CommandOutcomeFailureStage defines model for CommandOutcome.FailureStage.

const (
	Authentication CommandOutcomeFailureStage = "authentication"
	Command        CommandOutcomeFailureStage = "command"
	LocalService   CommandOutcomeFailureStage = "local_service"
	PublicUrl      CommandOutcomeFailureStage = "public_url"
	Setup          CommandOutcomeFailureStage = "setup"
)

Defines values for CommandOutcomeFailureStage.

func (CommandOutcomeFailureStage) Valid

func (e CommandOutcomeFailureStage) Valid() bool

Valid indicates whether the value is a known member of the CommandOutcomeFailureStage enum.

type DemoEvent

type DemoEvent struct {
	EventId      EventID                `json:"event_id"`
	EventVersion DemoEventEventVersion  `json:"event_version"`
	Name         DemoEventName          `json:"name"`
	Payload      map[string]interface{} `json:"payload"`
}

DemoEvent defines model for DemoEvent.

type DemoEventEventVersion

type DemoEventEventVersion int

DemoEventEventVersion defines model for DemoEvent.EventVersion.

const (
	DemoEventEventVersionN1 DemoEventEventVersion = 1
)

Defines values for DemoEventEventVersion.

func (DemoEventEventVersion) Valid

func (e DemoEventEventVersion) Valid() bool

Valid indicates whether the value is a known member of the DemoEventEventVersion enum.

type DemoEventName

type DemoEventName string

DemoEventName defines model for DemoEvent.Name.

const (
	DemoFirstPing DemoEventName = "demo.first_ping"
)

Defines values for DemoEventName.

func (DemoEventName) Valid

func (e DemoEventName) Valid() bool

Valid indicates whether the value is a known member of the DemoEventName enum.

type Duration

type Duration string

Duration defines model for Duration.

const (
	Longer Duration = "longer"
	Lt10s  Duration = "lt_10s"
	Lt1m   Duration = "lt_1m"
	Lt1s   Duration = "lt_1s"
)

Defines values for Duration.

func (Duration) Valid

func (e Duration) Valid() bool

Valid indicates whether the value is a known member of the Duration enum.

type Event

type Event struct {
	// contains filtered or unexported fields
}

Event defines model for Event.

func (Event) AsCommandEvent

func (t Event) AsCommandEvent() (CommandEvent, error)

AsCommandEvent returns the union data inside the Event as a CommandEvent

func (Event) AsDemoEvent

func (t Event) AsDemoEvent() (DemoEvent, error)

AsDemoEvent returns the union data inside the Event as a DemoEvent

func (Event) AsIntegrationEvent

func (t Event) AsIntegrationEvent() (IntegrationEvent, error)

AsIntegrationEvent returns the union data inside the Event as a IntegrationEvent

func (Event) AsReadyEvent

func (t Event) AsReadyEvent() (ReadyEvent, error)

AsReadyEvent returns the union data inside the Event as a ReadyEvent

func (Event) AsTransportEvent

func (t Event) AsTransportEvent() (TransportEvent, error)

AsTransportEvent returns the union data inside the Event as a TransportEvent

func (Event) Discriminator

func (t Event) Discriminator() (string, error)

func (*Event) FromCommandEvent

func (t *Event) FromCommandEvent(v CommandEvent) error

FromCommandEvent overwrites any union data inside the Event as the provided CommandEvent

func (*Event) FromDemoEvent

func (t *Event) FromDemoEvent(v DemoEvent) error

FromDemoEvent overwrites any union data inside the Event as the provided DemoEvent

func (*Event) FromIntegrationEvent

func (t *Event) FromIntegrationEvent(v IntegrationEvent) error

FromIntegrationEvent overwrites any union data inside the Event as the provided IntegrationEvent

func (*Event) FromReadyEvent

func (t *Event) FromReadyEvent(v ReadyEvent) error

FromReadyEvent overwrites any union data inside the Event as the provided ReadyEvent

func (*Event) FromTransportEvent

func (t *Event) FromTransportEvent(v TransportEvent) error

FromTransportEvent overwrites any union data inside the Event as the provided TransportEvent

func (Event) MarshalJSON

func (t Event) MarshalJSON() ([]byte, error)

func (*Event) MergeCommandEvent

func (t *Event) MergeCommandEvent(v CommandEvent) error

MergeCommandEvent performs a merge with any union data inside the Event, using the provided CommandEvent

func (*Event) MergeDemoEvent

func (t *Event) MergeDemoEvent(v DemoEvent) error

MergeDemoEvent performs a merge with any union data inside the Event, using the provided DemoEvent

func (*Event) MergeIntegrationEvent

func (t *Event) MergeIntegrationEvent(v IntegrationEvent) error

MergeIntegrationEvent performs a merge with any union data inside the Event, using the provided IntegrationEvent

func (*Event) MergeReadyEvent

func (t *Event) MergeReadyEvent(v ReadyEvent) error

MergeReadyEvent performs a merge with any union data inside the Event, using the provided ReadyEvent

func (*Event) MergeTransportEvent

func (t *Event) MergeTransportEvent(v TransportEvent) error

MergeTransportEvent performs a merge with any union data inside the Event, using the provided TransportEvent

func (*Event) UnmarshalJSON

func (t *Event) UnmarshalJSON(b []byte) error

func (Event) ValueByDiscriminator

func (t Event) ValueByDiscriminator() (interface{}, error)

type EventID

type EventID = string

EventID defines model for EventID.

type IntegrationEvent

type IntegrationEvent struct {
	EventId      EventID                      `json:"event_id"`
	EventVersion IntegrationEventEventVersion `json:"event_version"`
	Name         IntegrationEventName         `json:"name"`
	Payload      IntegrationOutcome           `json:"payload"`
}

IntegrationEvent defines model for IntegrationEvent.

type IntegrationEventEventVersion

type IntegrationEventEventVersion int

IntegrationEventEventVersion defines model for IntegrationEvent.EventVersion.

const (
	IntegrationEventEventVersionN1 IntegrationEventEventVersion = 1
)

Defines values for IntegrationEventEventVersion.

func (IntegrationEventEventVersion) Valid

Valid indicates whether the value is a known member of the IntegrationEventEventVersion enum.

type IntegrationEventName

type IntegrationEventName string

IntegrationEventName defines model for IntegrationEvent.Name.

const (
	IntegrationEventNameIntegrationOutcome IntegrationEventName = "integration.outcome"
)

Defines values for IntegrationEventName.

func (IntegrationEventName) Valid

func (e IntegrationEventName) Valid() bool

Valid indicates whether the value is a known member of the IntegrationEventName enum.

type IntegrationOutcome

type IntegrationOutcome struct {
	Delivery *IntegrationOutcomeDelivery `json:"delivery,omitempty"`
	Kind     IntegrationOutcomeKind      `json:"kind"`
	Outcome  IntegrationOutcomeOutcome   `json:"outcome"`
}

IntegrationOutcome defines model for IntegrationOutcome.

type IntegrationOutcomeDelivery

type IntegrationOutcomeDelivery string

IntegrationOutcomeDelivery defines model for IntegrationOutcome.Delivery.

const (
	Fanout   IntegrationOutcomeDelivery = "fanout"
	Selected IntegrationOutcomeDelivery = "selected"
)

Defines values for IntegrationOutcomeDelivery.

func (IntegrationOutcomeDelivery) Valid

func (e IntegrationOutcomeDelivery) Valid() bool

Valid indicates whether the value is a known member of the IntegrationOutcomeDelivery enum.

type IntegrationOutcomeKind

type IntegrationOutcomeKind string

IntegrationOutcomeKind defines model for IntegrationOutcome.Kind.

const (
	IntegrationOutcomeKindOauth   IntegrationOutcomeKind = "oauth"
	IntegrationOutcomeKindWebhook IntegrationOutcomeKind = "webhook"
)

Defines values for IntegrationOutcomeKind.

func (IntegrationOutcomeKind) Valid

func (e IntegrationOutcomeKind) Valid() bool

Valid indicates whether the value is a known member of the IntegrationOutcomeKind enum.

type IntegrationOutcomeOutcome

type IntegrationOutcomeOutcome string

IntegrationOutcomeOutcome defines model for IntegrationOutcome.Outcome.

const (
	ReachedReceiver IntegrationOutcomeOutcome = "reached_receiver"
	Ready           IntegrationOutcomeOutcome = "ready"
	Redirected      IntegrationOutcomeOutcome = "redirected"
)

Defines values for IntegrationOutcomeOutcome.

func (IntegrationOutcomeOutcome) Valid

func (e IntegrationOutcomeOutcome) Valid() bool

Valid indicates whether the value is a known member of the IntegrationOutcomeOutcome enum.

type Measurement

type Measurement struct {
	Count int64 `json:"count"`

	// Duration Measured setup or recovery duration. Omitted for fallback counts.
	Duration  Duration  `json:"duration,omitempty"`
	Operation Operation `json:"operation"`
	Outcome   Outcome   `json:"outcome"`
	Path      Path      `json:"path"`
}

Measurement defines model for Measurement.

type Operation

type Operation string

Operation defines model for Operation.

const (
	DirectConnect Operation = "direct_connect"
	Fallback      Operation = "fallback"
	Recovery      Operation = "recovery"
	RelayConnect  Operation = "relay_connect"
)

Defines values for Operation.

func (Operation) Valid

func (e Operation) Valid() bool

Valid indicates whether the value is a known member of the Operation enum.

type Outcome

type Outcome string

Outcome defines model for Outcome.

const (
	Canceled  Outcome = "canceled"
	Failed    Outcome = "failed"
	Succeeded Outcome = "succeeded"
)

Defines values for Outcome.

func (Outcome) Valid

func (e Outcome) Valid() bool

Valid indicates whether the value is a known member of the Outcome enum.

type Path

type Path string

Path defines model for Path.

const (
	DirectUdp Path = "direct_udp"
	Quic      Path = "quic"
	Wss       Path = "wss"
)

Defines values for Path.

func (Path) Valid

func (e Path) Valid() bool

Valid indicates whether the value is a known member of the Path enum.

type PublicationReady

type PublicationReady struct {
	Framework   *PublicationReadyFramework  `json:"framework,omitempty"`
	PublishMode PublicationReadyPublishMode `json:"publish_mode"`
	ServerKind  PublicationReadyServerKind  `json:"server_kind"`
}

PublicationReady defines model for PublicationReady.

type PublicationReadyFramework

type PublicationReadyFramework string

PublicationReadyFramework defines model for PublicationReady.Framework.

const (
	PublicationReadyFrameworkNext  PublicationReadyFramework = "next"
	PublicationReadyFrameworkOther PublicationReadyFramework = "other"
	PublicationReadyFrameworkVite  PublicationReadyFramework = "vite"
)

Defines values for PublicationReadyFramework.

func (PublicationReadyFramework) Valid

func (e PublicationReadyFramework) Valid() bool

Valid indicates whether the value is a known member of the PublicationReadyFramework enum.

type PublicationReadyPublishMode

type PublicationReadyPublishMode string

PublicationReadyPublishMode defines model for PublicationReady.PublishMode.

const (
	App  PublicationReadyPublishMode = "app"
	Demo PublicationReadyPublishMode = "demo"
)

Defines values for PublicationReadyPublishMode.

func (PublicationReadyPublishMode) Valid

Valid indicates whether the value is a known member of the PublicationReadyPublishMode enum.

type PublicationReadyServerKind

type PublicationReadyServerKind string

PublicationReadyServerKind defines model for PublicationReady.ServerKind.

const (
	Hosted     PublicationReadyServerKind = "hosted"
	SelfHosted PublicationReadyServerKind = "self_hosted"
)

Defines values for PublicationReadyServerKind.

func (PublicationReadyServerKind) Valid

func (e PublicationReadyServerKind) Valid() bool

Valid indicates whether the value is a known member of the PublicationReadyServerKind enum.

type ReadyEvent

type ReadyEvent struct {
	EventId      EventID                `json:"event_id"`
	EventVersion ReadyEventEventVersion `json:"event_version"`
	Name         ReadyEventName         `json:"name"`
	Payload      PublicationReady       `json:"payload"`
}

ReadyEvent defines model for ReadyEvent.

type ReadyEventEventVersion

type ReadyEventEventVersion int

ReadyEventEventVersion defines model for ReadyEvent.EventVersion.

const (
	ReadyEventEventVersionN1 ReadyEventEventVersion = 1
)

Defines values for ReadyEventEventVersion.

func (ReadyEventEventVersion) Valid

func (e ReadyEventEventVersion) Valid() bool

Valid indicates whether the value is a known member of the ReadyEventEventVersion enum.

type ReadyEventName

type ReadyEventName string

ReadyEventName defines model for ReadyEvent.Name.

const (
	TunnelReady ReadyEventName = "tunnel.ready"
)

Defines values for ReadyEventName.

func (ReadyEventName) Valid

func (e ReadyEventName) Valid() bool

Valid indicates whether the value is a known member of the ReadyEventName enum.

type RecordTelemetryBatchJSONRequestBody

type RecordTelemetryBatchJSONRequestBody = Batch

RecordTelemetryBatchJSONRequestBody defines body for RecordTelemetryBatch for application/json ContentType.

type TransportEvent

type TransportEvent struct {
	EventId      EventID                    `json:"event_id"`
	EventVersion TransportEventEventVersion `json:"event_version"`
	Name         TransportEventName         `json:"name"`
	Payload      TransportReport            `json:"payload"`
}

TransportEvent defines model for TransportEvent.

type TransportEventEventVersion

type TransportEventEventVersion int

TransportEventEventVersion defines model for TransportEvent.EventVersion.

const (
	TransportEventEventVersionN1 TransportEventEventVersion = 1
)

Defines values for TransportEventEventVersion.

func (TransportEventEventVersion) Valid

func (e TransportEventEventVersion) Valid() bool

Valid indicates whether the value is a known member of the TransportEventEventVersion enum.

type TransportEventName

type TransportEventName string

TransportEventName defines model for TransportEvent.Name.

const (
	TransportEventNameTransportReport TransportEventName = "transport.report"
)

Defines values for TransportEventName.

func (TransportEventName) Valid

func (e TransportEventName) Valid() bool

Valid indicates whether the value is a known member of the TransportEventName enum.

type TransportReport

type TransportReport struct {
	Measurements []Measurement       `json:"measurements"`
	Role         TransportReportRole `json:"role"`
}

TransportReport defines model for TransportReport.

type TransportReportRole

type TransportReportRole string

TransportReportRole defines model for TransportReport.Role.

const (
	TransportReportRoleConnector TransportReportRole = "connector"
	TransportReportRolePublisher TransportReportRole = "publisher"
)

Defines values for TransportReportRole.

func (TransportReportRole) Valid

func (e TransportReportRole) Valid() bool

Valid indicates whether the value is a known member of the TransportReportRole enum.

Jump to

Keyboard shortcuts

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