Documentation ¶
Overview ¶
Package axiom implements Go bindings for the Axiom API.
Usage:
import "github.com/axiomhq/axiom-go/axiom" import "github.com/axiomhq/axiom-go/axiom/ingest" // When ingesting data import "github.com/axiomhq/axiom-go/axiom/otel" // When using OpenTelemetry import "github.com/axiomhq/axiom-go/axiom/query" // When constructing APL queries import "github.com/axiomhq/axiom-go/axiom/querylegacy" // When constructing legacy queries
Construct a new Axiom client, then use the various services on the client to access different parts of the Axiom API. The package automatically takes its configuration from the environment if not specified otherwise. Refer to NewClient for details. The token can be an api or personal token. The api token however, will just allow ingestion or querying into or from the datasets the token is valid for, depending on its assigned permissions.
To construct a client:
client, err := axiom.NewClient()
or with Option functions:
client, err := axiom.NewClient( axiom.SetToken("..."), axiom.SetOrganizationID("..."), )
Get the current authenticated user:
user, err := client.Users.Current(ctx)
NOTE: Every client method mapping to an API method takes a context.Context as its first parameter to pass cancellation signals and deadlines to requests. In case there is no context available, then context.Background can be used as a starting point.
For more code samples, check out the examples.
Example ¶
package main import ( "context" "fmt" "log" "github.com/axiomhq/axiom-go/axiom" ) func main() { client, err := axiom.NewClient() if err != nil { log.Fatal(err) } user, err := client.Users.Current(context.Background()) if err != nil { log.Fatal(err) } fmt.Printf("Hello %s!\n", user.Name) }
Output:
Index ¶
- Variables
- func AddURLOptions(s string, opt any) (string, error)
- func DefaultHTTPClient() *http.Client
- func DefaultHTTPTransport() http.RoundTripper
- func ValidateCredentials(ctx context.Context) error
- func ValidateEnvironment() error
- type APIToken
- type Action
- type Annotation
- type AnnotationCreateRequest
- type AnnotationUpdateRequest
- type AnnotationsFilter
- type AnnotationsService
- func (a *AnnotationsService) Create(ctx context.Context, annotation *AnnotationCreateRequest) (*Annotation, error)
- func (a *AnnotationsService) Delete(ctx context.Context, id string) error
- func (a *AnnotationsService) Get(ctx context.Context, id string) (*Annotation, error)
- func (a *AnnotationsService) List(ctx context.Context, filter *AnnotationsFilter) ([]*Annotation, error)
- func (a *AnnotationsService) Update(ctx context.Context, id string, annotation *AnnotationUpdateRequest) (*Annotation, error)
- type Client
- func (c *Client) Call(ctx context.Context, method, path string, body, v any) error
- func (c *Client) Do(req *http.Request, v any) (*Response, error)
- func (c *Client) Ingest(ctx context.Context, id string, r io.Reader, typ ContentType, ...) (*ingest.Status, error)
- func (c *Client) IngestChannel(ctx context.Context, id string, events <-chan Event, options ...ingest.Option) (*ingest.Status, error)
- func (c *Client) IngestEvents(ctx context.Context, id string, events []Event, options ...ingest.Option) (*ingest.Status, error)
- func (c *Client) NewRequest(ctx context.Context, method, path string, body any) (*http.Request, error)
- func (c *Client) Options(options ...Option) error
- func (c *Client) Query(ctx context.Context, apl string, options ...query.Option) (*query.Result, error)
- func (c *Client) QueryLegacy(ctx context.Context, id string, q querylegacy.Query, opts querylegacy.Options) (*querylegacy.Result, error)deprecated
- func (c *Client) ValidateCredentials(ctx context.Context) error
- type ContentEncoder
- type ContentEncoding
- type ContentType
- type CreateTokenRequest
- type CreateTokenResponse
- type CreateUserRequest
- type CustomWebhook
- type Dataset
- type DatasetCapabilities
- type DatasetCreateRequest
- type DatasetUpdateRequest
- type DatasetsService
- func (s *DatasetsService) Create(ctx context.Context, req DatasetCreateRequest) (*Dataset, error)
- func (s *DatasetsService) Delete(ctx context.Context, id string) error
- func (s *DatasetsService) Get(ctx context.Context, id string) (*Dataset, error)
- func (s *DatasetsService) Ingest(ctx context.Context, id string, r io.Reader, typ ContentType, ...) (*ingest.Status, error)
- func (s *DatasetsService) IngestChannel(ctx context.Context, id string, events <-chan Event, options ...ingest.Option) (*ingest.Status, error)
- func (s *DatasetsService) IngestEvents(ctx context.Context, id string, events []Event, options ...ingest.Option) (*ingest.Status, error)
- func (s *DatasetsService) List(ctx context.Context) ([]*Dataset, error)
- func (s *DatasetsService) Query(ctx context.Context, apl string, options ...query.Option) (*query.Result, error)
- func (s *DatasetsService) QueryLegacy(ctx context.Context, id string, q querylegacy.Query, opts querylegacy.Options) (*querylegacy.Result, error)deprecated
- func (s *DatasetsService) Trim(ctx context.Context, id string, maxDuration time.Duration) error
- func (s *DatasetsService) Update(ctx context.Context, id string, req DatasetUpdateRequest) (*Dataset, error)
- type DiscordConfig
- type DiscordWebhookConfig
- type EmailConfig
- type Event
- type HTTPError
- type License
- type Limit
- type LimitError
- type LimitScope
- type MicrosoftTeams
- type Monitor
- type MonitorCreateRequest
- type MonitorType
- type MonitorUpdateRequest
- type MonitorsService
- func (s *MonitorsService) Create(ctx context.Context, req MonitorCreateRequest) (*Monitor, error)
- func (s *MonitorsService) Delete(ctx context.Context, id string) error
- func (s *MonitorsService) Get(ctx context.Context, id string) (*Monitor, error)
- func (s *MonitorsService) List(ctx context.Context) ([]*Monitor, error)
- func (s *MonitorsService) Update(ctx context.Context, id string, req MonitorUpdateRequest) (*Monitor, error)
- type Notifier
- type NotifierProperties
- type NotifiersService
- func (s *NotifiersService) Create(ctx context.Context, req Notifier) (*Notifier, error)
- func (s *NotifiersService) Delete(ctx context.Context, id string) error
- func (s *NotifiersService) Get(ctx context.Context, id string) (*Notifier, error)
- func (s *NotifiersService) List(ctx context.Context) ([]*Notifier, error)
- func (s *NotifiersService) Update(ctx context.Context, id string, req Notifier) (*Notifier, error)
- type Operator
- type OpsGenieConfig
- type Option
- func SetAPITokenConfig(apiToken string) Option
- func SetClient(httpClient *http.Client) Option
- func SetNoEnv() Option
- func SetNoRetry() Option
- func SetNoTracing() Option
- func SetOrganizationID(organizationID string) Option
- func SetPersonalTokenConfig(personalToken, organizationID string) Option
- func SetToken(accessToken string) Option
- func SetURL(baseURL string) Option
- func SetUserAgent(userAgent string) Option
- type OrganisationCapabilities
- type Organization
- type OrganizationsService
- type PagerDutyConfig
- type PaymentStatus
- type Plan
- type RegenerateTokenRequest
- type Response
- type SlackConfig
- type TokensService
- func (s *TokensService) Create(ctx context.Context, req CreateTokenRequest) (*CreateTokenResponse, error)
- func (s *TokensService) Delete(ctx context.Context, id string) error
- func (s *TokensService) Get(ctx context.Context, id string) (*APIToken, error)
- func (s *TokensService) List(ctx context.Context) ([]*APIToken, error)
- func (s *TokensService) Regenerate(ctx context.Context, id string, req RegenerateTokenRequest) (*CreateTokenResponse, error)
- type UpdateUserRequest
- type UpdateUserRoleRequest
- type User
- type UserRole
- type UsersService
- func (s *UsersService) Create(ctx context.Context, req CreateUserRequest) (*User, error)
- func (s *UsersService) Current(ctx context.Context) (*User, error)
- func (s *UsersService) Delete(ctx context.Context, id string) error
- func (s *UsersService) Get(ctx context.Context, id string) (*User, error)
- func (s *UsersService) List(ctx context.Context) ([]*User, error)
- func (s *UsersService) Update(ctx context.Context, id string, req UpdateUserRequest) (*User, error)
- func (s *UsersService) UpdateUsersRole(ctx context.Context, id string, req UpdateUserRoleRequest) (*User, error)
- type WebhookConfig
Examples ¶
Constants ¶
This section is empty.
Variables ¶
var ErrExists = newHTTPError(http.StatusConflict)
ErrExists is returned when the resource that was attempted to create already exists.
var ErrNotFound = newHTTPError(http.StatusNotFound)
ErrNotFound is returned when the requested resource is not found.
var ErrUnauthenticated = newHTTPError(http.StatusUnauthorized)
ErrUnauthenticated is raised when the authentication on the request is not valid.
ErrUnauthorized is raised when the user or authentication token misses permissions to perform the requested operation.
var ErrUnknownContentEncoding = errors.New("unknown content encoding")
ErrUnknownContentEncoding is raised when the given ContentEncoding is not valid.
var ErrUnknownContentType = errors.New("unknown content type")
ErrUnknownContentType is raised when the given ContentType is not valid.
Functions ¶
func AddURLOptions ¶ added in v0.15.0
AddURLOptions adds the parameters in opt as url query parameters to s. opt must be a struct whose fields may contain "url" tags.
Ref: https://github.com/google/go-github/blob/master/github/github.go#L232.
func DefaultHTTPClient ¶
DefaultHTTPClient returns the default http.Client used for making requests.
func DefaultHTTPTransport ¶ added in v0.13.0
func DefaultHTTPTransport() http.RoundTripper
DefaultHTTPTransport returns the default http.Client.Transport used by DefaultHTTPClient.
func ValidateCredentials ¶ added in v0.6.0
ValidateCredentials returns nil if the environment variables that configure a Client are valid. Otherwise, it returns an appropriate error. This function establishes a connection to the configured Axiom API.
func ValidateEnvironment ¶ added in v0.5.0
func ValidateEnvironment() error
ValidateEnvironment returns nil if the environment variables, needed to configure a new Client, are present and syntactically valid. Otherwise, it returns an appropriate error.
Types ¶
type APIToken ¶ added in v0.20.0
type APIToken struct { // ID is the unique ID of the token. ID string `json:"id"` // Name is the name of the token. Name string `json:"name"` // Description is the description of the token. Description string `json:"description"` // ExpiresAt is the time when the token expires. ExpiresAt time.Time `json:"expiresAt"` // DatasetCapabilities is a map of dataset names to the capabilities // available to that dataset for the token. DatasetCapabilities map[string]DatasetCapabilities `json:"datasetCapabilities"` // OrganisationCapabilities is the organisation capabilities available to // the token. OrganisationCapabilities OrganisationCapabilities `json:"orgCapabilities"` }
APIToken represents an API token returned from the Axiom API.
type Action ¶ added in v0.20.0
type Action uint8
Action represents an action that can be performed on an Axiom resource.
const ( ActionCreate Action // create ActionRead // read ActionUpdate // update ActionDelete // delete )
All available [Action]s.
func (Action) MarshalJSON ¶ added in v0.20.0
MarshalJSON implements json.Marshaler. It is in place to marshal the Action to its string representation because that's what the server expects.
func (*Action) UnmarshalJSON ¶ added in v0.20.0
UnmarshalJSON implements json.Unmarshaler. It is in place to unmarshal the Action from the string representation the server returns.
type Annotation ¶ added in v0.19.0
type Annotation struct { // ID is the ID of the Annotation. Always starts with `ann_`. ID string `json:"id"` // Datasets is a list of dataset IDs that the Annotation is attached to. Datasets []string `json:"datasets"` // Time is the start time of the Annotation. Time time.Time `json:"time"` // EndTime is the end time of the Annotation. EndTime time.Time `json:"endTime"` // Title is the title of the Annotation. Title string `json:"title"` // Description is the description of the Annotation. Description string `json:"description"` // URL is the URL of the Annotation. URL string `json:"url"` // Type is the type of the Annotation. Can only contain lowercase // alphanumerical characters and dashes. Type string `json:"type"` }
Annotation represents an Annotation returned from the Axiom API.
type AnnotationCreateRequest ¶ added in v0.19.0
type AnnotationCreateRequest struct { // Required: // Datasets is a list of dataset IDs that the Annotation is attached to. Datasets []string `json:"datasets"` // Type is the type of the Annotation. Can only contain lowercase // alphanumerical characters and dashes. Type string `json:"type"` // Optional: // Time is the start time of the Annotation. Time time.Time `json:"time,omitempty"` // EndTime is the end time of the Annotation. EndTime time.Time `json:"endTime,omitempty"` // Title is the title of the Annotation. Title string `json:"title,omitempty"` // Description is the description of the Annotation. Description string `json:"description,omitempty"` // URL is the URL of the Annotation. URL string `json:"url,omitempty"` }
AnnotationCreateRequest is the request payload for creating a new Annotation.
type AnnotationUpdateRequest ¶ added in v0.19.0
type AnnotationUpdateRequest struct { // Datasets is a list of dataset IDs that the Annotation is attached to. Datasets []string `json:"datasets,omitempty"` // Time is the start time of the Annotation. Time time.Time `json:"time,omitempty"` // EndTime is the end time of the Annotation. EndTime time.Time `json:"endTime,omitempty"` // Title is the title of the Annotation. Title string `json:"title,omitempty"` // Description is the description of the Annotation. Description string `json:"description,omitempty"` // URL is the URL of the Annotation. URL string `json:"url,omitempty"` // Type is the type of the Annotation. Can only contain lowercase // alphanumerical characters and dashes. Type string `json:"type,omitempty"` }
AnnotationUpdateRequest is the request payload for updating an Annotation.
type AnnotationsFilter ¶ added in v0.19.0
type AnnotationsFilter struct { Datasets []string `url:"datasets"` Start time.Time `url:"start"` End time.Time `url:"start"` }
AnnotationsFilter filters annotations on the AnnotationsService.List method.
type AnnotationsService ¶ added in v0.19.0
type AnnotationsService service
AnnotationsService handles communication with the dataset related operations of the Axiom API.
Axiom API Reference: /v2/annotations
func (*AnnotationsService) Create ¶ added in v0.19.0
func (a *AnnotationsService) Create(ctx context.Context, annotation *AnnotationCreateRequest) (*Annotation, error)
Create a new annotation.
func (*AnnotationsService) Delete ¶ added in v0.19.0
func (a *AnnotationsService) Delete(ctx context.Context, id string) error
Delete the Annotation with the given ID.
func (*AnnotationsService) Get ¶ added in v0.19.0
func (a *AnnotationsService) Get(ctx context.Context, id string) (*Annotation, error)
Get the Annotation with the given ID.
func (*AnnotationsService) List ¶ added in v0.19.0
func (a *AnnotationsService) List(ctx context.Context, filter *AnnotationsFilter) ([]*Annotation, error)
List annotations.
func (*AnnotationsService) Update ¶ added in v0.19.0
func (a *AnnotationsService) Update(ctx context.Context, id string, annotation *AnnotationUpdateRequest) (*Annotation, error)
type Client ¶
type Client struct { // Services for communicating with different parts of the Axiom API. Datasets *DatasetsService Organizations *OrganizationsService Users *UsersService Monitors *MonitorsService Notifiers *NotifiersService Annotations *AnnotationsService Tokens *TokensService // contains filtered or unexported fields }
Client provides the Axiom HTTP API operations.
func NewClient ¶
NewClient returns a new Axiom API client. It automatically takes its configuration from the environment. To connect, export the following environment variables:
- AXIOM_TOKEN
- AXIOM_ORG_ID (only when using a personal token)
The configuration can be set manually using options which are prefixed with "Set".
The token must be an api or personal token which can be created on the settings or user profile page on Axiom.
func (*Client) Call ¶ added in v0.13.0
Call creates a new API request and executes it. The response body is JSON decoded or directly written to v, depending on v being an io.Writer or not.
func (*Client) Do ¶ added in v0.13.0
Do sends an API request and returns the API response. The response body is JSON decoded or directly written to v, depending on v being an io.Writer or not.
func (*Client) Ingest ¶ added in v0.14.0
func (c *Client) Ingest(ctx context.Context, id string, r io.Reader, typ ContentType, enc ContentEncoding, options ...ingest.Option) (*ingest.Status, error)
Ingest data into the dataset identified by its id.
The timestamp of the events will be set by the server to the current server time if the "_time" field is not set. The server can be instructed to use a different field as the timestamp by setting the ingest.SetTimestampField option. If not explicitly specified by ingest.SetTimestampFormat, the timestamp format is auto detected.
Restrictions for field names (JSON object keys) can be reviewed in our documentation.
The reader is streamed to the server until EOF is reached on a single connection. Keep that in mind when dealing with slow readers.
This function is an alias to DatasetsService.Ingest.
func (*Client) IngestChannel ¶ added in v0.14.0
func (c *Client) IngestChannel(ctx context.Context, id string, events <-chan Event, options ...ingest.Option) (*ingest.Status, error)
IngestChannel ingests events from a channel into the dataset identified by its id.
The timestamp of the events will be set by the server to the current server time if the "_time" field is not set. The server can be instructed to use a different field as the timestamp by setting the ingest.SetTimestampField option. If not explicitly specified by ingest.SetTimestampFormat, the timestamp format is auto detected.
Restrictions for field names (JSON object keys) can be reviewed in our documentation.
Events are ingested in batches. A batch is either 10000 events for unbuffered channels or the capacity of the channel for buffered channels. The maximum batch size is 10000. A batch is sent to the server as soon as it is full, after one second or when the channel is closed.
The method returns with an error when the context is marked as done or an error occurs when sending the events to the server. A partial ingestion is possible and the returned ingest status is valid to use. When the context is marked as done, no attempt is made to send the buffered events to the server.
The method returns without an error if the channel is closed and the buffered events are successfully sent to the server.
This function is an alias to DatasetsService.IngestChannel.
func (*Client) IngestEvents ¶ added in v0.14.0
func (c *Client) IngestEvents(ctx context.Context, id string, events []Event, options ...ingest.Option) (*ingest.Status, error)
IngestEvents ingests events into the dataset identified by its id.
The timestamp of the events will be set by the server to the current server time if the "_time" field is not set. The server can be instructed to use a different field as the timestamp by setting the ingest.SetTimestampField option. If not explicitly specified by ingest.SetTimestampFormat, the timestamp format is auto detected.
Restrictions for field names (JSON object keys) can be reviewed in our documentation.
For ingesting large amounts of data, consider using the Client.Ingest or Client.IngestChannel method.
This function is an alias to DatasetsService.IngestEvents.
func (*Client) NewRequest ¶ added in v0.13.0
func (c *Client) NewRequest(ctx context.Context, method, path string, body any) (*http.Request, error)
NewRequest creates an API request. If specified, the value pointed to by body will be included as the request body. If it is not an io.Reader, it will be included as a JSON encoded request body.
func (*Client) Query ¶ added in v0.14.0
func (c *Client) Query(ctx context.Context, apl string, options ...query.Option) (*query.Result, error)
Query executes the given query specified using the Axiom Processing Language (APL).
To learn more about APL, please refer to our documentation.
This function is an alias to DatasetsService.Query.
func (*Client) QueryLegacy
deprecated
added in
v0.14.0
func (c *Client) QueryLegacy(ctx context.Context, id string, q querylegacy.Query, opts querylegacy.Options) (*querylegacy.Result, error)
QueryLegacy executes the given legacy query on the dataset identified by its id.
This function is an alias to DatasetsService.Query.
Deprecated: Legacy queries will be replaced by queries specified using the Axiom Processing Language (APL) and the legacy query API will be removed in the future. Use Client.Query instead.
type ContentEncoder ¶ added in v0.8.0
ContentEncoder is a function that wraps a given reader with encoding functionality and returns that enhanced reader. The content type of the encoded content must obviously be accepted by the server.
See GzipEncoder and ZstdEncoder for implementation reference.
func GzipEncoder ¶ added in v0.8.0
func GzipEncoder() ContentEncoder
GzipEncoder returns a content encoder that gzip compresses the data it reads from the provided reader. The compression level defaults to gzip.BestSpeed.
func GzipEncoderWithLevel ¶ added in v0.8.0
func GzipEncoderWithLevel(level int) ContentEncoder
GzipEncoderWithLevel returns a content encoder that gzip compresses data using the specified compression level.
func ZstdEncoder ¶ added in v0.8.0
func ZstdEncoder() ContentEncoder
ZstdEncoder is a content encoder that zstd compresses the data it reads from the provided reader.
type ContentEncoding ¶
type ContentEncoding uint8
ContentEncoding describes the content encoding of the data to ingest.
const ( // Identity marks the data as not being encoded. Identity ContentEncoding = iota + 1 // // Gzip marks the data as being gzip encoded. A [GzipEncoder] can be used to // encode the data. Gzip // gzip // Zstd marks the data as being zstd encoded. A [ZstdEncoder] can be used to // encode the data. Zstd // zstd )
func (ContentEncoding) String ¶
func (i ContentEncoding) String() string
type ContentType ¶
type ContentType uint8
ContentType describes the content type of the data to ingest.
const ( // JSON treats the data as JSON array. JSON ContentType = iota + 1 // application/json // NDJSON treats the data as newline delimited JSON objects. Preferred // data format. NDJSON // application/x-ndjson // CSV treats the data as CSV content. CSV // text/csv )
func DetectContentType ¶
DetectContentType detects the content type of a readers data. The returned reader must be used instead of the passed one. Compressed content is not detected.
func (ContentType) String ¶
func (i ContentType) String() string
type CreateTokenRequest ¶ added in v0.20.0
type CreateTokenRequest struct { // Name is the name of the token. Name string `json:"name"` // Description is the description of the token. Description string `json:"description"` // ExpiresAt is the time when the token expires. ExpiresAt time.Time `json:"expiresAt"` // DatasetCapabilities is a map of dataset names to the capabilities // available to that dataset for the token. DatasetCapabilities map[string]DatasetCapabilities `json:"datasetCapabilities"` // OrganisationCapabilities is the organisation capabilities available to // the token. OrganisationCapabilities OrganisationCapabilities `json:"orgCapabilities"` }
CreateTokenRequest is the request payload for creating a new token with the Axiom API.
type CreateTokenResponse ¶ added in v0.20.0
type CreateTokenResponse struct { APIToken // Token is the token value to be used in api calls Token string `json:"token"` }
CreateTokenResponse is the response payload for creating a new token with the Axiom API.
type CreateUserRequest ¶ added in v0.17.3
type CreateUserRequest struct { // Name is the name of the user. Name string `json:"name"` // Email is the email of the user. Email string `json:"email"` // Role is the role of the user. Role string `json:"role"` }
CreateUserRequest represents a request to create a user.
type CustomWebhook ¶ added in v0.20.0
type Dataset ¶
type Dataset struct { // ID of the dataset. ID string `json:"id"` // Name is the unique name of the dataset. Name string `json:"name"` // Description of the dataset. Description string `json:"description"` // CreatedBy is the ID of the user who created the dataset. CreatedBy string `json:"who"` // CreatedAt is the time the dataset was created at. CreatedAt time.Time `json:"created"` }
Dataset represents an Axiom dataset.
type DatasetCapabilities ¶ added in v0.20.0
type DatasetCapabilities struct { // Ingest is the ingest capability and the actions that can be performed on // them. Ingest []Action `json:"ingest"` // Query is the query capability and the actions that can be performed on // them. Query []Action `json:"query"` // StarredQueries is the starred queries capability and the actions that can // be performed on them. StarredQueries []Action `json:"starredQueries"` // VirtualFields is the VirtualFields capability and the actions that can be // performed on them. VirtualFields []Action `json:"virtualFields"` }
DatasetCapabilities represents the capabilities available to a token for a dataset.
type DatasetCreateRequest ¶
type DatasetCreateRequest struct { // Name of the dataset to create. Restricted to 80 characters of [a-zA-Z0-9] // and special characters "-", "_" and ".". Special characters cannot be a // prefix or suffix. The prefix cannot be "axiom-". Name string `json:"name"` // Description of the dataset to create. Description string `json:"description"` }
DatasetCreateRequest is a request used to create a dataset.
type DatasetUpdateRequest ¶
type DatasetUpdateRequest struct { // Description of the dataset to update. Description string `json:"description"` }
DatasetUpdateRequest is a request used to update a dataset.
type DatasetsService ¶
type DatasetsService service
DatasetsService handles communication with the dataset related operations of the Axiom API.
Axiom API Reference: /v2/datasets
func (*DatasetsService) Create ¶
func (s *DatasetsService) Create(ctx context.Context, req DatasetCreateRequest) (*Dataset, error)
Create a dataset with the given properties.
func (*DatasetsService) Delete ¶
func (s *DatasetsService) Delete(ctx context.Context, id string) error
Delete the dataset identified by the given id.
func (*DatasetsService) Ingest ¶
func (s *DatasetsService) Ingest(ctx context.Context, id string, r io.Reader, typ ContentType, enc ContentEncoding, options ...ingest.Option) (*ingest.Status, error)
Ingest data into the dataset identified by its id.
The timestamp of the events will be set by the server to the current server time if the "_time" field is not set. The server can be instructed to use a different field as the timestamp by setting the ingest.SetTimestampField option. If not explicitly specified by ingest.SetTimestampFormat, the timestamp format is auto detected.
Restrictions for field names (JSON object keys) can be reviewed in our documentation.
The reader is streamed to the server until EOF is reached on a single connection. Keep that in mind when dealing with slow readers.
func (*DatasetsService) IngestChannel ¶ added in v0.12.0
func (s *DatasetsService) IngestChannel(ctx context.Context, id string, events <-chan Event, options ...ingest.Option) (*ingest.Status, error)
IngestChannel ingests events from a channel into the dataset identified by its id.
The timestamp of the events will be set by the server to the current server time if the "_time" field is not set. The server can be instructed to use a different field as the timestamp by setting the ingest.SetTimestampField option. If not explicitly specified by ingest.SetTimestampFormat, the timestamp format is auto detected.
Restrictions for field names (JSON object keys) can be reviewed in our documentation.
Events are ingested in batches. A batch is either 10000 events for unbuffered channels or the capacity of the channel for buffered channels. The maximum batch size is 10000. A batch is sent to the server as soon as it is full, after one second or when the channel is closed.
The method returns with an error when the context is marked as done or an error occurs when sending the events to the server. A partial ingestion is possible and the returned ingest status is valid to use. When the context is marked as done, no attempt is made to send the buffered events to the server.
The method returns without an error if the channel is closed and the buffered events are successfully sent to the server.
The returned ingest status does not contain a trace ID as the underlying implementation possibly sends multiple requests to the server thus generating multiple trace IDs.
func (*DatasetsService) IngestEvents ¶
func (s *DatasetsService) IngestEvents(ctx context.Context, id string, events []Event, options ...ingest.Option) (*ingest.Status, error)
IngestEvents ingests events into the dataset identified by its id.
The timestamp of the events will be set by the server to the current server time if the "_time" field is not set. The server can be instructed to use a different field as the timestamp by setting the ingest.SetTimestampField option. If not explicitly specified by ingest.SetTimestampFormat, the timestamp format is auto detected.
Restrictions for field names (JSON object keys) can be reviewed in our documentation.
For ingesting large amounts of data, consider using the DatasetsService.Ingest or DatasetsService.IngestChannel method.
func (*DatasetsService) List ¶
func (s *DatasetsService) List(ctx context.Context) ([]*Dataset, error)
List all available datasets.
func (*DatasetsService) Query ¶
func (s *DatasetsService) Query(ctx context.Context, apl string, options ...query.Option) (*query.Result, error)
Query executes the given query specified using the Axiom Processing Language (APL).
To learn more about APL, please refer to our documentation.
func (*DatasetsService) QueryLegacy
deprecated
added in
v0.13.0
func (s *DatasetsService) QueryLegacy(ctx context.Context, id string, q querylegacy.Query, opts querylegacy.Options) (*querylegacy.Result, error)
QueryLegacy executes the given legacy query on the dataset identified by its id.
Deprecated: Legacy queries will be replaced by queries specified using the Axiom Processing Language (APL) and the legacy query API will be removed in the future. Use DatasetsService.Query instead.
func (*DatasetsService) Trim ¶
Trim the dataset identified by its id to a given length. The max duration given will mark the oldest timestamp an event can have. Older ones will be deleted from the dataset.
func (*DatasetsService) Update ¶
func (s *DatasetsService) Update(ctx context.Context, id string, req DatasetUpdateRequest) (*Dataset, error)
Update the dataset identified by the given id with the given properties.
type DiscordConfig ¶ added in v0.17.3
type DiscordWebhookConfig ¶ added in v0.17.3
type DiscordWebhookConfig struct { // DiscordWebhookURL is the URL to send the message to. DiscordWebhookURL string `json:"discordWebhookUrl,omitempty"` }
type EmailConfig ¶ added in v0.17.3
type EmailConfig struct { // Emails to send the message to. Emails []string `json:"emails"` }
type Event ¶
An Event is a map of key-value pairs.
If you want to set a timestamp for the event you can either use ingest.TimestampField as map key for the timestamp or specify any other field that carries the timestamp by passing ingest.SetTimestampField to DatasetsService.Ingest, DatasetsService.IngestEvents or DatasetsService.IngestChannel as an Option.
type HTTPError ¶ added in v0.17.1
type HTTPError struct { Status int `json:"-"` Message string `json:"message"` TraceID string `json:"-"` }
HTTPError is the generic error response returned on non 2xx HTTP status codes.
type License ¶
type License struct { // ID of the license. ID string `json:"id"` // Issuer of the license. Issuer string `json:"issuer"` // IssuedTo describes who the license was issued to. IssuedTo string `json:"issuedTo"` // IssuedAt is the time the license was issued at. IssuedAt time.Time `json:"issuedAt"` // ValidFrom is the time the license is valid from. ValidFrom time.Time `json:"validFrom"` // ExpiresAt is the time the license expires. ExpiresAt time.Time `json:"expiresAt"` // Plan associated with the license. Plan Plan `json:"tier"` // MonthlyIngestGB is the monthly amount of data in gigabytes that can be // ingested as part of the license. MonthlyIngestGB uint64 `json:"monthlyIngestGb"` // MaxUsers is the maximum amount of teams allowed. MaxUsers uint64 `json:"maxUsers"` // MaxTeams is the maximum amount of user allowed. MaxTeams uint64 `json:"maxTeams"` // MaxDatasets is the maximum amount of datasets allowed. MaxDatasets uint64 `json:"maxDatasets"` // MaxQueryWindow is the maximum query window allowed. MaxQueryWindow time.Duration `json:"maxQueryWindowSeconds"` // MaxAuditWindow is the maximum audit window allowed. MaxAuditWindow time.Duration `json:"maxAuditWindowSeconds"` // WithRBAC specifies it RBAC is enabled. WithRBAC bool `json:"withRBAC"` // WithAuths specifies the supported authentication modes. WithAuths []string `json:"withAuths"` // Error is the last error (if any) on token refresh. Error string `json:"error"` }
License of an Organization.
func (License) MarshalJSON ¶
MarshalJSON implements json.Marshaler. It is in place to marshal the MaxQueryWindow and MaxAuditWindow to seconds because that's what the server expects.
func (*License) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler. It is in place to unmarshal the MaxQueryWindow and MaxAuditWindow into a proper time.Duration value because the server returns it in seconds.
type Limit ¶ added in v0.10.0
type Limit struct { // Scope a limit is enforced for. Only present on rate limited requests. Scope LimitScope // The maximum limit a client is limited to for a specified time window // which resets at the time indicated by [Limit.Reset]. Limit uint64 // The remaining count towards the maximum limit. Remaining uint64 // The time at which the current limit time window will reset. Reset time.Time // contains filtered or unexported fields }
Limit represents a limit for the current client.
Axiom API Reference: https://www.axiom.co/docs/restapi/api-limits
func (Limit) String ¶ added in v0.10.0
String returns a string representation of the limit.
It implements fmt.Stringer.
type LimitError ¶ added in v0.10.0
LimitError occurs when http status codes 429 (TooManyRequests) or 430 (Axiom-sepcific when ingest or query limit are reached) are encountered.
func (LimitError) Error ¶ added in v0.10.0
func (e LimitError) Error() string
Error returns the string representation of the limit error.
It implements error.
func (LimitError) Is ¶ added in v0.10.0
func (e LimitError) Is(target error) bool
Is returns whether the provided error equals this error.
type LimitScope ¶ added in v0.10.0
type LimitScope uint8
LimitScope is the scope of a Limit.
const ( LimitScopeUnknown LimitScope = iota // unknown LimitScopeUser // user LimitScopeOrganization // organization LimitScopeAnonymous // anonymous )
All available Limit scopes.
func (LimitScope) String ¶ added in v0.10.0
func (i LimitScope) String() string
type MicrosoftTeams ¶ added in v0.17.3
type MicrosoftTeams struct { // URL is the URL to send the message to. URL string `json:"microsoftTeamsUrl,omitempty"` }
type Monitor ¶
type Monitor struct { // ID is the unique ID of the monitor. ID string `json:"id,omitempty"` // CreatedAt is the time when the monitor was created. CreatedAt time.Time `json:"createdAt"` // CreatedBy is the ID of the user who created the monitor. CreatedBy string `json:"createdBy"` // Name is the name of the monitor. Name string `json:"name"` // Type sets the type of monitor. Defaults to [Threshold] Type MonitorType `json:"type"` // Description of the monitor. Description string `json:"description,omitempty"` // APLQuery is the APL query to use for the monitor. APLQuery string `json:"aplQuery"` // Operator is the operator to use for the monitor. Operator Operator `json:"operator"` // Threshold the query result is compared against, which evaluates if the monitor acts or not. Threshold float64 `json:"threshold"` // AlertOnNoData indicates whether to alert on no data. AlertOnNoData bool `json:"alertOnNoData"` // NotifyByGroup tracks each non-time group independently. NotifyByGroup bool `json:"notifyByGroup"` // Resolvable determines whether the events triggered by the monitor are resolvable. This has no effect on threshold monitors. Resolvable bool `json:"resolvable"` // NotifierIDs attached to the monitor. NotifierIDs []string `json:"NotifierIDs"` // Interval is the interval in minutes in which the monitor will run. Interval time.Duration `json:"IntervalMinutes"` // Range the monitor goes back in time and looks at the data it acts on. Range time.Duration `json:"RangeMinutes"` // Disabled sets whether the monitor is disabled or not. Disabled bool `json:"disabled"` // DisabledUntil is the time that the monitor will be disabled until. DisabledUntil time.Time `json:"disabledUntil"` }
func (Monitor) MarshalJSON ¶
MarshalJSON implements json.Marshaler. It is in place to marshal the Range and Interval to minutes because that's what the server expects as well as setting the appropriate query type.
func (*Monitor) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler. It is in place to convert the Range and Interval field values into proper time.Duration values because the server returns them in seconds as well as unmarshalling the query in to its appropriate type.
type MonitorCreateRequest ¶ added in v0.17.3
type MonitorCreateRequest struct {
Monitor
}
type MonitorType ¶ added in v0.20.0
type MonitorType uint8
MonitorType represents the type of the monitor.
const ( MonitorTypeThreshold MonitorType = iota // Threshold MonitorTypeMatchEvent // MatchEvent )
All available [MonitorTypes]s.
func (MonitorType) MarshalJSON ¶ added in v0.20.0
func (c MonitorType) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler. It is in place to marshal the MonitorType to its string representation because that's what the server expects.
func (MonitorType) String ¶ added in v0.20.0
func (i MonitorType) String() string
func (*MonitorType) UnmarshalJSON ¶ added in v0.20.0
func (c *MonitorType) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements json.Unmarshaler. It is in place to unmarshal the MonitorType from the string representation the server returns.
type MonitorUpdateRequest ¶ added in v0.17.3
type MonitorUpdateRequest struct {
Monitor
}
type MonitorsService ¶
type MonitorsService service
Axiom API Reference: /v2/monitors
func (*MonitorsService) Create ¶
func (s *MonitorsService) Create(ctx context.Context, req MonitorCreateRequest) (*Monitor, error)
Create a monitor with the given properties.
func (*MonitorsService) Delete ¶
func (s *MonitorsService) Delete(ctx context.Context, id string) error
Delete the monitor identified by the given id.
func (*MonitorsService) List ¶
func (s *MonitorsService) List(ctx context.Context) ([]*Monitor, error)
List all available monitors.
func (*MonitorsService) Update ¶
func (s *MonitorsService) Update(ctx context.Context, id string, req MonitorUpdateRequest) (*Monitor, error)
Update the monitor identified by the given id with the given properties.
type Notifier ¶
type Notifier struct { // ID is the unique ID of the notifier. ID string `json:"id"` // Name is the name of the notifier. Name string `json:"name"` // DisabledUntil sets the notifier's disabled until property. DisabledUntil time.Time `json:"disabledUntil"` // Properties of the notifier. Properties NotifierProperties `json:"properties"` // CreatedAt is the time when the notifier was created. CreatedAt time.Time `json:"createdAt"` // CreatedBy is the id of the user who created the notifier. CreatedBy string `json:"createdBy"` }
type NotifierProperties ¶ added in v0.17.3
type NotifierProperties struct { // Discord configuration. Discord *DiscordConfig `json:"discord,omitempty"` // DiscordWebhook configuration. DiscordWebhook *DiscordWebhookConfig `json:"discordWebhook,omitempty"` // Email configuration. Email *EmailConfig `json:"email,omitempty"` // OpsGenie configuration. Opsgenie *OpsGenieConfig `json:"opsgenie,omitempty"` // PagerDuty configuration. Pagerduty *PagerDutyConfig `json:"pagerduty,omitempty"` // Slack configuration. Slack *SlackConfig `json:"slack,omitempty"` // Webhook configuration. Webhook *WebhookConfig `json:"webhook,omitempty"` // MicrosoftTeams configuration. MicrosoftTeams *MicrosoftTeams `json:"microsoftTeams,omitempty"` // CustomWebhook configuration. CustomWebhook *CustomWebhook `json:"customWebhook,omitempty"` }
type NotifiersService ¶
type NotifiersService service
Axiom API Reference: /v2/notifiers
func (*NotifiersService) Delete ¶
func (s *NotifiersService) Delete(ctx context.Context, id string) error
Delete the notifier identified by the given id.
type Operator ¶ added in v0.17.3
type Operator uint8
Operator represents a comparison operation for a monitor. A Monitor acts on the result of comparing a query result with a threshold.
const ( Below Operator // Below BelowOrEqual // BelowOrEqual Above // Above AboveOrEqual // AboveOrEqual )
All available Monitor comparison [Operator]s.
func (Operator) MarshalJSON ¶ added in v0.17.3
MarshalJSON implements json.Marshaler. It is in place to marshal the Operator to its string representation because that's what the server expects.
func (*Operator) UnmarshalJSON ¶ added in v0.17.3
UnmarshalJSON implements json.Unmarshaler. It is in place to unmarshal the Operator from the string representation the server returns.
type OpsGenieConfig ¶ added in v0.17.3
type Option ¶
An Option modifies the behaviour of the client. If not otherwise specified by a specific option, they are safe to use even after methods have been called. However, they are not safe to use while the client is performing an operation.
func SetAPITokenConfig ¶ added in v0.13.0
SetAPITokenConfig specifies all properties needed in order to successfully connect to Axiom with an API token.
func SetNoEnv ¶ added in v0.6.1
func SetNoEnv() Option
SetNoEnv prevents the Client from deriving its configuration from the environment (by auto reading "AXIOM_*" environment variables).
func SetNoRetry ¶ added in v0.14.1
func SetNoRetry() Option
SetNoRetry prevents the Client from auto-retrying failed HTTP requests under certain circumstances.
func SetNoTracing ¶ added in v0.17.2
func SetNoTracing() Option
SetNoTracing prevents the Client from acquiring a tracer from the global tracer provider, even if one is configured.
func SetOrganizationID ¶ added in v0.13.0
SetOrganizationID specifies the organization ID used by the Client.
When a personal token is used, this method can be used to switch between organizations by passing it to the Client.Options method.
Can also be specified using the "AXIOM_ORG_ID" environment variable.
func SetPersonalTokenConfig ¶ added in v0.13.0
SetPersonalTokenConfig specifies all properties needed in order to successfully connect to Axiom with a personal token.
func SetToken ¶ added in v0.13.1
SetToken specifies the token used by the Client.
Can also be specified using the "AXIOM_TOKEN" environment variable.
func SetURL ¶ added in v0.4.0
SetURL specifies the base URL used by the Client.
Can also be specified using the "AXIOM_URL" environment variable.
func SetUserAgent ¶
SetUserAgent specifies the user agent used by the Client.
type OrganisationCapabilities ¶ added in v0.20.0
type OrganisationCapabilities struct { // Annotations is the Annotations capability and the actions that can be // performed on them. Annotations []Action `json:"annotations,omitempty"` // APITokens is the APITokens capability and the actions that can be // performed on them. APITokens []Action `json:"apiTokens,omitempty"` // Billing is the Billing capability and the actions that can be performed // on them. Billing []Action `json:"billing,omitempty"` // Dashboards is the Dashboards capability and the actions that can be // performed on them. Dashboards []Action `json:"dashboards,omitempty"` // Datasets is the Datasets capability and the actions that can be performed // on them. Datasets []Action `json:"datasets,omitempty"` // Endpoints is the Endpoints capability and the actions that can be // performed on them. Endpoints []Action `json:"endpoints,omitempty"` // Flows is the Flows capability and the actions that can be performed on // them. Flows []Action `json:"flows,omitempty"` // Integrations is the Integrations capability and the actions that can be // performed on them. Integrations []Action `json:"integrations,omitempty"` // Monitors is the Monitors capability and the actions that can be performed // on them. Monitors []Action `json:"monitors,omitempty"` // Notifiers is the Notifiers capability and the actions that can be // performed on them. Notifiers []Action `json:"notifiers,omitempty"` // RBAC is the RBAC capability and the actions that can be performed on // them. RBAC []Action `json:"rbac,omitempty"` // can be performed on them. SharedAccessKeys []Action `json:"sharedAccessKeys,omitempty"` // Users is the Users capability and the actions that can be performed on // them. Users []Action `json:"users,omitempty"` }
OrganisationCapabilities represents the capabilities available to a token for an organisation.
type Organization ¶
type Organization struct { // ID is the unique ID of the organization. ID string `json:"id"` // Name of the organization. Name string `json:"name"` // Slug of the organization. Slug string `json:"slug"` // Trial describes if the plan is trialed or not. Trial bool `json:"inTrial"` // Plan the organization is on. Plan Plan `json:"plan"` // PlanCreated is the time the plan was created. PlanCreated time.Time `json:"planCreated"` // LastUsageSync is the last time the usage instance usage statistics were // synchronized. LastUsageSync time.Time `json:"lastUsageSync"` // Role the requesting user has in the organization. Role UserRole `json:"role"` // PrimaryEmail of the user that issued the request. PrimaryEmail string `json:"primaryEmail"` // License of the organization. License License `json:"license"` // PaymentStatus is the status of the current payment for the organization. PaymentStatus PaymentStatus `json:"paymentStatus"` // CreatedAt is the time the organization was created. CreatedAt time.Time `json:"metaCreated"` // ModifiedAt is the time the organization was last modified. ModifiedAt time.Time `json:"metaModified"` }
Organization represents an organization.
type OrganizationsService ¶
type OrganizationsService service
OrganizationsService handles communication with the organization related operations of the Axiom API.
Axiom API Reference: /v1/orgs
func (*OrganizationsService) Get ¶
func (s *OrganizationsService) Get(ctx context.Context, id string) (*Organization, error)
Get an organization by id.
func (*OrganizationsService) List ¶
func (s *OrganizationsService) List(ctx context.Context) ([]*Organization, error)
List all available organizations.
type PagerDutyConfig ¶ added in v0.17.3
type PaymentStatus ¶ added in v0.14.0
type PaymentStatus uint8
PaymentStatus represents the payment status of an Organization.
const ( Success PaymentStatus // success NotAvailable // na Failed // failed Blocked // blocked )
All available Organization [PaymentStatus]es.
func (PaymentStatus) MarshalJSON ¶ added in v0.14.0
func (ps PaymentStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler. It is in place to marshal the payment status to its string representation because that's what the server expects.
func (PaymentStatus) String ¶ added in v0.14.0
func (i PaymentStatus) String() string
func (*PaymentStatus) UnmarshalJSON ¶ added in v0.14.0
func (ps *PaymentStatus) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON implements json.Unmarshaler. It is in place to unmarshal the payment status from the string representation the server returns.
type Plan ¶
type Plan uint8
Plan represents the plan of an Organization.
const ( Personal Plan // personal Basic // basic Team // teamMonthly Enterprise // enterprise Comped // comped )
All available Organization [Plan]s.
func (Plan) MarshalJSON ¶
MarshalJSON implements json.Marshaler. It is in place to marshal the plan to its string representation because that's what the server expects.
func (*Plan) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler. It is in place to unmarshal the plan from the string representation the server returns.
type RegenerateTokenRequest ¶ added in v0.20.0
type RegenerateTokenRequest struct { // ExistingTokenExpiresAt is the time when the existing token will expire. ExistingTokenExpiresAt time.Time `json:"existingTokenExpiresAt"` // NewTokenExpiresAt is the time when the new token will expire. NewTokenExpiresAt time.Time `json:"newTokenExpiresAt"` }
RegenerateTokenRequest is the request payload for regenerating a token with the Axiom API.
type Response ¶ added in v0.13.0
Response wraps the default http response type. It never has an open body.
type SlackConfig ¶ added in v0.17.3
type SlackConfig struct { // SlackChannel is the channel to send the message to. SlackURL string `json:"slackUrl,omitempty"` }
type TokensService ¶ added in v0.20.0
type TokensService service
TokensService handles communication with the api token related operations of the Axiom API.
Axiom API Reference: /v2/tokens
func (*TokensService) Create ¶ added in v0.20.0
func (s *TokensService) Create(ctx context.Context, req CreateTokenRequest) (*CreateTokenResponse, error)
Create a token with the given properties.
func (*TokensService) Delete ¶ added in v0.20.0
func (s *TokensService) Delete(ctx context.Context, id string) error
Delete the token identified by the given id.
func (*TokensService) List ¶ added in v0.20.0
func (s *TokensService) List(ctx context.Context) ([]*APIToken, error)
List all available tokens.
func (*TokensService) Regenerate ¶ added in v0.20.0
func (s *TokensService) Regenerate(ctx context.Context, id string, req RegenerateTokenRequest) (*CreateTokenResponse, error)
Regenerate the token identified by the given id.
type UpdateUserRequest ¶ added in v0.17.3
type UpdateUserRequest struct { // Name is the new name of the user. Name string `json:"name"` }
UpdateUserRequest represents a request to update a user.
type UpdateUserRoleRequest ¶ added in v0.17.3
type UpdateUserRoleRequest struct { // Role is the new role of the user. Role string `json:"role"` }
UpdateUserRoleRequest represents a request to update a user role.
type User ¶
type User struct { // ID is the unique ID of the user. ID string `json:"id"` // Name of the user. Name string `json:"name"` // Emails is the email address of the user. Email string `json:"email"` // Role is the role of the user. Role struct { // ID is the unique ID of the role. ID string `json:"id,omitempty"` // Name of the role. Name string `json:"name,omitempty"` } `json:"role"` }
User represents an user.
type UserRole ¶
type UserRole uint8
UserRole represents the role of an User.
const ( RoleCustom UserRole = iota // custom RoleNone // none RoleReadOnly // read-only RoleUser // user RoleAdmin // admin RoleOwner // owner )
All available User roles.
func (UserRole) MarshalJSON ¶
MarshalJSON implements json.Marshaler. It is in place to marshal the UserRole to its string representation because that's what the server expects.
func (*UserRole) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler. It is in place to unmarshal the UserRole from the string representation the server returns.
type UsersService ¶
type UsersService service
UsersService handles communication with the user related operations of the Axiom API.
Axiom API Reference: /v2/users
func (*UsersService) Create ¶
func (s *UsersService) Create(ctx context.Context, req CreateUserRequest) (*User, error)
Create will create and invite a user to the organisation.
func (*UsersService) Current ¶
func (s *UsersService) Current(ctx context.Context) (*User, error)
Current retrieves the authenticated user.
func (*UsersService) Delete ¶
func (s *UsersService) Delete(ctx context.Context, id string) error
Delete will remove a user from the organization.
func (*UsersService) List ¶
func (s *UsersService) List(ctx context.Context) ([]*User, error)
List all users.
func (*UsersService) Update ¶
func (s *UsersService) Update(ctx context.Context, id string, req UpdateUserRequest) (*User, error)
Update will update a user.
func (*UsersService) UpdateUsersRole ¶ added in v0.17.3
func (s *UsersService) UpdateUsersRole(ctx context.Context, id string, req UpdateUserRoleRequest) (*User, error)
UpdateUsersRole will update a user role.
type WebhookConfig ¶ added in v0.17.3
type WebhookConfig struct { // URL is the URL to send the message to. URL string `json:"url,omitempty"` }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package ingest provides the datatypes and functions helping with ingesting data into Axiom.
|
Package ingest provides the datatypes and functions helping with ingesting data into Axiom. |
Package otel provides helpers for using [OpenTelemetry] with Axiom.
|
Package otel provides helpers for using [OpenTelemetry] with Axiom. |
Package query provides the datatypes and functions for construction queries using the Axiom Processing Language (APL) and working with their results.
|
Package query provides the datatypes and functions for construction queries using the Axiom Processing Language (APL) and working with their results. |
Package querylegacy provides the datatypes and functions for construction legacy queries and working with their results.
|
Package querylegacy provides the datatypes and functions for construction legacy queries and working with their results. |