Documentation
¶
Index ¶
- Variables
- func Enabled(baseURL, token string) bool
- type Ack
- type Client
- func (c *Client) Ack(ctx context.Context, ack Ack) error
- func (c *Client) Fetch(ctx context.Context) (*config.Snapshot, SnapshotIdentity, error)
- func (c *Client) Heartbeat(ctx context.Context, schemas []int, envelopeVersion int) error
- func (c *Client) Publish(ctx context.Context, events []telemetry.Event) error
- func (c *Client) UpdateCredentials(ctx context.Context, accountID string, expectedRevision int64, ...) (CredentialUpdateResult, error)
- type CredentialUpdateResult
- type SnapshotEnvelope
- type SnapshotIdentity
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCredentialRevisionConflict = errors.New("credential revision conflict")
Functions ¶
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 ¶
func (*Client) UpdateCredentials ¶
func (c *Client) UpdateCredentials(ctx context.Context, accountID string, expectedRevision int64, credential config.Credential) (CredentialUpdateResult, error)
type CredentialUpdateResult ¶
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
Click to show internal directories.
Click to hide internal directories.