honeycomb

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	BaseURL       string
	ManagementKey string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(httpCtx core.HTTPContext, ctx core.IntegrationContext) (*Client, error)

func (*Client) CreateEvent

func (c *Client) CreateEvent(datasetSlug string, fields map[string]any) error

func (*Client) CreateWebhookRecipient

func (c *Client) CreateWebhookRecipient(webhookURL, secret string) (Recipient, error)

func (*Client) DeleteRecipient

func (c *Client) DeleteRecipient(recipientID string, datasetSlug string) error

func (*Client) EnsureConfigurationKey

func (c *Client) EnsureConfigurationKey(teamSlug string) error

EnsureConfigurationKey creates a configuration API key via the /2 API and stores its secret for use in /1 API requests. If a valid key already exists, it is reused.

func (*Client) EnsureIngestKey

func (c *Client) EnsureIngestKey(teamSlug string) error

EnsureIngestKey creates an ingest API key via the /2 API and stores it for use when sending events. If a valid key already exists, it is reused.

func (*Client) EnsureRecipientOnTrigger

func (c *Client) EnsureRecipientOnTrigger(datasetSlug, triggerID, recipientID string) error

EnsureRecipientOnTrigger attaches a webhook recipient to a Honeycomb trigger if not already attached.

func (*Client) GetTrigger

func (c *Client) GetTrigger(datasetSlug, triggerID string) (map[string]any, error)

func (*Client) ListDatasets

func (c *Client) ListDatasets() ([]Dataset, error)

func (*Client) ListTriggers

func (c *Client) ListTriggers(datasetSlug string) ([]HoneycombTrigger, error)

func (*Client) RemoveRecipientFromTrigger

func (c *Client) RemoveRecipientFromTrigger(datasetSlug, triggerID, recipientID string) error

func (*Client) UpdateTrigger

func (c *Client) UpdateTrigger(datasetSlug, triggerID string, trigger map[string]any) error

func (*Client) ValidateManagementKey

func (c *Client) ValidateManagementKey(teamSlug string) error

type Configuration

type Configuration struct {
	Site            string `json:"site" mapstructure:"site"`
	ManagementKey   string `json:"managementKey" mapstructure:"managementKey"`
	TeamSlug        string `json:"teamSlug" mapstructure:"teamSlug"`
	EnvironmentSlug string `json:"environmentSlug" mapstructure:"environmentSlug"`
}

type CreateEvent

type CreateEvent struct{}

func (*CreateEvent) Cancel

func (c *CreateEvent) Cancel(ctx core.ExecutionContext) error

func (*CreateEvent) Cleanup

func (c *CreateEvent) Cleanup(ctx core.SetupContext) error

func (*CreateEvent) Color

func (c *CreateEvent) Color() string

func (*CreateEvent) Configuration

func (c *CreateEvent) Configuration() []configuration.Field

func (*CreateEvent) Description

func (c *CreateEvent) Description() string

func (*CreateEvent) Documentation

func (c *CreateEvent) Documentation() string

func (*CreateEvent) ExampleOutput

func (c *CreateEvent) ExampleOutput() map[string]any

func (*CreateEvent) Execute

func (c *CreateEvent) Execute(ctx core.ExecutionContext) error

func (*CreateEvent) HandleHook added in v0.18.0

func (c *CreateEvent) HandleHook(ctx core.ActionHookContext) error

func (*CreateEvent) HandleWebhook

func (*CreateEvent) Hooks added in v0.18.0

func (c *CreateEvent) Hooks() []core.Hook

func (*CreateEvent) Icon

func (c *CreateEvent) Icon() string

func (*CreateEvent) Label

func (c *CreateEvent) Label() string

func (*CreateEvent) Name

func (c *CreateEvent) Name() string

func (*CreateEvent) OutputChannels

func (c *CreateEvent) OutputChannels(configuration any) []core.OutputChannel

func (*CreateEvent) ProcessQueueItem

func (c *CreateEvent) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*CreateEvent) Setup

func (c *CreateEvent) Setup(ctx core.SetupContext) error

type CreateEventConfiguration

type CreateEventConfiguration struct {
	Dataset string         `json:"dataset" mapstructure:"dataset"`
	Fields  map[string]any `json:"fields" mapstructure:"fields"`
}

type Dataset

type Dataset struct {
	Name string `json:"name"`
	Slug string `json:"slug"`
}

type Honeycomb

type Honeycomb struct{}

func (*Honeycomb) Actions

func (h *Honeycomb) Actions() []core.Action

func (*Honeycomb) Cleanup

func (*Honeycomb) Configuration

func (h *Honeycomb) Configuration() []configuration.Field

func (*Honeycomb) Description

func (h *Honeycomb) Description() string

func (*Honeycomb) HandleHook added in v0.18.0

func (h *Honeycomb) HandleHook(ctx core.IntegrationHookContext) error

func (*Honeycomb) HandleRequest

func (h *Honeycomb) HandleRequest(ctx core.HTTPRequestContext)

func (*Honeycomb) Hooks added in v0.18.0

func (h *Honeycomb) Hooks() []core.Hook

func (*Honeycomb) Icon

func (h *Honeycomb) Icon() string

func (*Honeycomb) Instructions

func (h *Honeycomb) Instructions() string

func (*Honeycomb) Label

func (h *Honeycomb) Label() string

func (*Honeycomb) ListResources

func (h *Honeycomb) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)

func (*Honeycomb) Name

func (h *Honeycomb) Name() string

func (*Honeycomb) Sync

func (h *Honeycomb) Sync(ctx core.SyncContext) error

func (*Honeycomb) Triggers

func (h *Honeycomb) Triggers() []core.Trigger

type HoneycombTrigger

type HoneycombTrigger struct {
	ID   string         `json:"id"`
	Name string         `json:"name"`
	Raw  map[string]any `json:"-"`
}

type HoneycombWebhookHandler

type HoneycombWebhookHandler struct{}

func (*HoneycombWebhookHandler) Cleanup

func (*HoneycombWebhookHandler) CompareConfig

func (h *HoneycombWebhookHandler) CompareConfig(a, b any) (bool, error)

Share webhook if dataset matches - Merge will union the trigger IDs

func (*HoneycombWebhookHandler) Merge

func (h *HoneycombWebhookHandler) Merge(current, requested any) (any, bool, error)

func (*HoneycombWebhookHandler) Setup

type OnAlertFired

type OnAlertFired struct{}

func (*OnAlertFired) Cleanup

func (t *OnAlertFired) Cleanup(ctx core.TriggerContext) error

func (*OnAlertFired) Color

func (t *OnAlertFired) Color() string

func (*OnAlertFired) Configuration

func (t *OnAlertFired) Configuration() []configuration.Field

func (*OnAlertFired) Description

func (t *OnAlertFired) Description() string

func (*OnAlertFired) Documentation

func (t *OnAlertFired) Documentation() string

func (*OnAlertFired) ExampleData

func (t *OnAlertFired) ExampleData() map[string]any

func (*OnAlertFired) HandleHook added in v0.18.0

func (t *OnAlertFired) HandleHook(ctx core.TriggerHookContext) (map[string]any, error)

func (*OnAlertFired) HandleWebhook

func (*OnAlertFired) Hooks added in v0.18.0

func (t *OnAlertFired) Hooks() []core.Hook

func (*OnAlertFired) Icon

func (t *OnAlertFired) Icon() string

func (*OnAlertFired) Label

func (t *OnAlertFired) Label() string

func (*OnAlertFired) Name

func (t *OnAlertFired) Name() string

func (*OnAlertFired) Setup

func (t *OnAlertFired) Setup(ctx core.TriggerContext) error

type OnAlertFiredConfiguration

type OnAlertFiredConfiguration struct {
	DatasetSlug string `json:"datasetSlug" mapstructure:"datasetSlug"`
	Trigger     string `json:"trigger" mapstructure:"trigger"`
}

type OnAlertFiredNodeMetadata

type OnAlertFiredNodeMetadata struct {
	TriggerID string `json:"triggerId" mapstructure:"triggerId"`
}

type Recipient

type Recipient struct {
	ID      string         `json:"id"`
	Type    string         `json:"type"`
	Target  string         `json:"target"`
	Details map[string]any `json:"details,omitempty"`
}

type WebhookConfiguration

type WebhookConfiguration struct {
	DatasetSlug string   `json:"datasetSlug" mapstructure:"datasetSlug"`
	TriggerIDs  []string `json:"triggerIds" mapstructure:"triggerIds"`
}

type WebhookMetadata

type WebhookMetadata struct {
	RecipientID string `json:"recipientId" mapstructure:"recipientId"`
}

Jump to

Keyboard shortcuts

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