controlplane

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 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

Index

Constants

This section is empty.

Variables

View Source
var ErrCredentialRevisionConflict = errors.New("credential revision conflict")

Functions

func Enabled

func Enabled(baseURL, token string) bool

Types

type Ack

type Ack struct {
	GatewayID        string `json:"gateway_id"`
	Version          int    `json:"version,omitempty"`
	Checksum         string `json:"checksum,omitempty"`
	ConfigVersion    int64  `json:"config_version,omitempty"`
	SchemaVersion    int    `json:"schema_version,omitempty"`
	ConfigChecksum   string `json:"config_checksum,omitempty"`
	CredentialDigest string `json:"credential_digest,omitempty"`
	RuntimeChecksum  string `json:"runtime_checksum,omitempty"`
	EnvelopeVersion  int    `json:"envelope_version,omitempty"`
	Success          bool   `json:"success"`
	Error            string `json:"error,omitempty"`
}

func AckForIdentity

func AckForIdentity(id SnapshotIdentity, success bool, errText string) Ack

type Client

type Client struct {
	BaseURL   string
	Token     string
	GatewayID string
	HTTP      *http.Client
}

func New

func New(baseURL, token, gatewayID string) *Client

func (*Client) Ack

func (c *Client) Ack(ctx context.Context, ack Ack) error

func (*Client) Fetch

func (*Client) Heartbeat

func (c *Client) Heartbeat(ctx context.Context, schemas []int, envelopeVersion int) error

func (*Client) Publish

func (c *Client) Publish(ctx context.Context, events []telemetry.Event) error

func (*Client) UpdateCredentials

func (c *Client) UpdateCredentials(ctx context.Context, accountID string, expectedRevision int64, credential config.Credential) (CredentialUpdateResult, error)

type CredentialUpdateResult

type CredentialUpdateResult struct {
	CredentialRevision int64  `json:"credential_revision"`
	CredentialDigest   string `json:"credential_digest"`
}

type SnapshotEnvelope

type SnapshotEnvelope struct {
	Version          int             `json:"version"`
	Checksum         string          `json:"checksum"`
	ConfigVersion    *int64          `json:"config_version"`
	SchemaVersion    *int            `json:"schema_version"`
	ConfigChecksum   string          `json:"config_checksum"`
	CredentialDigest string          `json:"credential_digest"`
	RuntimeChecksum  string          `json:"runtime_checksum"`
	Snapshot         json.RawMessage `json:"snapshot"`
	Config           json.RawMessage `json:"config"`
}

type SnapshotIdentity

type SnapshotIdentity struct {
	ConfigVersion    int64
	SchemaVersion    int
	ConfigChecksum   string
	CredentialDigest string
	RuntimeChecksum  string
	EnvelopeVersion  int
}

func (SnapshotIdentity) Equal

func (i SnapshotIdentity) Equal(other SnapshotIdentity) bool

Jump to

Keyboard shortcuts

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