criblcontrolplanesdkgo

package module
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

README

cribl-control-plane-sdk-go

The Cribl Go SDK for the control plane provides operational control over Cribl resources and helps streamline the process of integrating with Cribl.

In addition to the usage examples in this repository, you can adapt the code examples for common use cases in the Cribl documentation to use Go instead of Python.

Complementary API reference documentation is available at https://docs.cribl.io/cribl-as-code/control-plane/. Product documentation is available at https://docs.cribl.io.

[!IMPORTANT] Cribl has stopped active development of the Go SDK for the control plane. The SDK will remain an open-source, community resource on the Cribl Community GitHub organization. You can continue using the Go SDK and build on it, but Cribl support will be limited to critical issues only for the defined transition period. Support will end on October 1, 2026. If you prefer to stay on a supported integration, consider migrating to the Python SDK, Terraform provider, or direct Cribl API access.

Table of Contents

SDK Installation

To add the SDK as a dependency to your project:

go get github.com/Cribl-Community/cribl-control-plane-sdk-go

SDK Example Usage

Example
package main

import (
	"context"
	"fmt"
	criblcontrolplanesdkgo "github.com/Cribl-Community/cribl-control-plane-sdk-go"
	"github.com/Cribl-Community/cribl-control-plane-sdk-go/models/components"
	"github.com/Cribl-Community/cribl-control-plane-sdk-go/models/operations"
	"log"
	"os"
)

func main() {
	ctx := context.Background()

	s := criblcontrolplanesdkgo.New(
		"https://api.example.com",
		criblcontrolplanesdkgo.WithSecurity(components.Security{
			BearerAuth: criblcontrolplanesdkgo.Pointer(os.Getenv("CRIBLCONTROLPLANE_BEARER_AUTH")),
		}),
	)

	// Check server health
	_, err := s.Health.Get(ctx)
	if err != nil {
		log.Fatal(err)
	}

	workerGroupID := "my-worker-group"
	groupURL := fmt.Sprintf("https://api.example.com/m/%s", workerGroupID)

	// Create a TCP JSON Source
	authType := components.AuthenticationMethodOptionsAuthTokensItemsManual
	authToken := "your-auth-token"
	sendToRoutes := true
	source, err := s.Sources.Create(ctx, operations.CreateCreateInputRequestTcpjson(operations.InputTcpjson{
		ID:           "my-tcp-json",
		Type:         operations.CreateInputTypeTcpjsonTcpjson,
		Host:         "0.0.0.0",
		Port:         9020.0,
		AuthType:     &authType,
		AuthToken:    &authToken,
		SendToRoutes: &sendToRoutes,
	}), operations.WithServerURL(groupURL))
	if err != nil {
		log.Fatal(err)
	}

	// Create a Filesystem Destination
	destination, err := s.Destinations.Create(ctx, operations.CreateCreateOutputRequestFilesystem(operations.OutputFilesystem{
		ID:       "my-fs-destination",
		Type:     operations.TypeFilesystemFilesystem,
		DestPath: "/tmp/my-output",
	}), operations.WithServerURL(groupURL))
	if err != nil {
		log.Fatal(err)
	}

	// Create a Pipeline
	output := "default"
	asyncFuncTimeout := int64(1000)
	filter := "true"
	final := true
	pipeline, err := s.Pipelines.Create(ctx, components.PipelineInput{
		ID: "my-pipeline",
		Conf: components.ConfInput{
			AsyncFuncTimeout: &asyncFuncTimeout,
			Output:           &output,
			Functions: []components.PipelineFunctionConfInput{
				components.CreatePipelineFunctionConfInputEval(components.PipelineFunctionEval{
					Filter: &filter,
					ID:     components.PipelineFunctionEvalIDEval,
					Final:  &final,
					Conf: components.FunctionConfSchemaEval{
						Remove: []string{"*"},
						Keep:   []string{"name"},
					},
				}),
			},
		},
	}, operations.WithServerURL(groupURL))
	if err != nil {
		log.Fatal(err)
	}

	// Add Route to Routing table
	routesListResponse, err := s.Routes.List(ctx, operations.WithServerURL(groupURL))
	if err != nil {
		log.Fatal(err)
	}
	routes := routesListResponse.CountedRoutes
	if routes != nil && len(routes.Items) > 0 && routes.Items[0].ID != "" {
		item := routes.Items[0]
		var pipelineID string
		if pipeline.CountedPipeline != nil && len(pipeline.CountedPipeline.Items) > 0 {
			pipelineID = pipeline.CountedPipeline.Items[0].ID
		}
		var destinationID string
		if destination.CountedOutput != nil && len(destination.CountedOutput.Items) > 0 {
			destinationID = "my-fs-destination"
		}
		_, err = s.Routes.Append(ctx, item.ID, []components.RouteConfInput{{
			Final:       criblcontrolplanesdkgo.Bool(false),
			ID:          criblcontrolplanesdkgo.String("my-route"),
			Name:        "my-route",
			Pipeline:    pipelineID,
			Output:      criblcontrolplanesdkgo.String(destinationID),
			Filter:      criblcontrolplanesdkgo.String("__inputId=='tcpjson:my-tcp-json'"),
			Description: criblcontrolplanesdkgo.String("My new route"),
		}}, operations.WithServerURL(groupURL))
		if err != nil {
			log.Fatal(err)
		}
	}

	// Commit configuration changes
	effective := true
	commitResponse, err := s.Versions.Commits.Create(ctx, components.GitCommitParams{
		Message:   "Initial configuration",
		Effective: &effective,
		Files:     []string{"."},
	}, &workerGroupID)
	if err != nil {
		log.Fatal(err)
	}
	var version string
	if commitResponse.CountedGitCommitSummary != nil && len(commitResponse.CountedGitCommitSummary.Items) > 0 {
		version = commitResponse.CountedGitCommitSummary.Items[0].Commit
	}

	// Deploy configuration changes
	_, err = s.Groups.Deploy(ctx, components.ProductsCoreStream, workerGroupID, components.DeployRequest{
		Version: version,
	})
	if err != nil {
		log.Fatal(err)
	}
}

[!NOTE] Additional examples demonstrating various SDK features and use cases can be found in the examples directory.

Authentication

Except for the health.get and auth.tokens.get methods, all Cribl SDK requests require you to authenticate with a Bearer token. You must include a valid Bearer token in the configuration when initializing your SDK client. The Bearer token verifies your identity and ensures secure access to the requested resources. The SDK automatically manages the Authorization header for subsequent requests once properly authenticated.

For information about Bearer token expiration, see Token Management in the Cribl as Code documentation.

Authentication happens once during SDK initialization. After you initialize the SDK client with authentication as shown in the authentication examples, the SDK automatically handles authentication for all subsequent API calls. You do not need to include authentication parameters in individual API requests. The SDK Example Usage section shows how to initialize the SDK and make API calls, but if you've properly initialized your client as shown in the authentication examples, you only need to make the API method calls themselves without re-initializing.

Per-Client Security Schemes

This SDK supports the following security schemes globally:

Name Type Scheme Environment Variable
BearerAuth http HTTP Bearer CRIBLCONTROLPLANE_BEARER_AUTH
ClientOauth oauth2 OAuth2 token CRIBLCONTROLPLANE_CLIENT_OAUTH

To configure authentication on Cribl.Cloud and in hybrid deployments, use the ClientOauth security scheme. The SDK uses the OAuth credentials that you provide to obtain a Bearer token and refresh the token within its expiration window using the standard OAuth2 flow.

In on-prem deployments, use the BearerAuth security scheme. The SDK uses the username/password credentials that you provide to obtain a Bearer token. Automatically refreshing the Bearer token within its expiration window requires a callback function as shown in the On-Prem Authentication Example.

Set the security scheme when initializing the SDK client instance using one of these optional parameters:

  • WithSecurity: Use for static security values (OAuth2 credentials that the SDK will manage automatically)
  • WithSecuritySource: Use for dynamic security with a callback function (automatic Bearer token refresh in on-prem deployments)

The SDK uses the selected scheme by default to authenticate with the API for all operations that support it.

Authentication Examples

The Cribl.Cloud and Hybrid Authentication Example demonstrates how to configure authentication on Cribl.Cloud and in hybrid deployments. To obtain the Client ID and Client Secret you'll need to initialize using the ClientOauth security schema, follow the instructions for creating an API Credential in the Cribl as Code documentation.

The On-Prem Authentication Example demonstrates how to configure authentication in on-prem deployments using your username and password.

Available Resources and Operations

Available methods
Auth.Tokens
  • Get - Log in and fetch an authentication token
Collectors
  • List - List all Collectors
  • Create - Create a Collector
  • Get - Get a Collector
  • Update - Update a Collector
  • Delete - Delete a Collector
DatabaseConnections
  • List - List all Database Connections
  • Create - Create a Database Connection
  • Get - Get a Database Connection
  • Update - Update a Database Connection
  • Delete - Delete a Database Connection
Destinations
  • List - List all Destinations
  • Create - Create a Destination
  • Get - Get a Destination
  • Update - Update a Destination
  • Delete - Delete a Destination
Destinations.Pq
  • Clear - Clear the persistent queue for a Destination
  • Get - Get information about the latest job to clear the persistent queue for a Destination
Destinations.Samples
  • Get - Get sample event data for a Destination
  • Create - Send sample event data to a Destination
Destinations.Statuses
  • List - List the status of all Destinations
  • Get - Get the status of a Destination
Functions
  • List - List all Functions
  • Get - Get a Function
Groups
  • List - List all Worker Groups, Outpost Groups, or Edge Fleets
  • Create - Create a Worker Group, Outpost Group, or Edge Fleet
  • Get - Get a Worker Group, Outpost Group, or Edge Fleet
  • Update - Update a Worker Group, Outpost Group, or Edge Fleet
  • Delete - Delete a Worker Group, Outpost Group, or Edge Fleet
  • Deploy - Deploy commits to a Worker Group, Outpost Group, or Edge Fleet
Groups.Acl
  • Get - Get the Access Control List for a Worker Group, Outpost Group, or Edge Fleet
  • Get - Get the Access Control List for teams with permissions on a Worker Group, Outpost Group, or Edge Fleet for the specified Cribl product
Groups.Configs.Versions
  • Get - Get the configuration version for a Worker Group, Outpost Group, or Edge Fleet
Health
  • Get - Get the health status of the server
Lakes.Datasets
  • List - List all Lake Datasets (Cribl.Cloud only)
  • Create - Create a Lake Dataset (Cribl.Cloud only)
  • Get - Get a Lake Dataset (Cribl.Cloud only)
  • Update - Update a Lake Dataset (Cribl.Cloud only)
  • Delete - Delete a Lake Dataset (Cribl.Cloud only)
Nodes
  • Count - Get a count of Worker, Edge, or Outpost Nodes
  • List - Get detailed metadata for Worker, Edge, or Outpost Nodes
  • Get - Get detailed metadata for a Worker, Edge, or Outpost Node
  • Restart - Restart Worker, Edge, or Outpost Nodes
Nodes.Summaries
  • Get - Get a summary of the deployment for a Cribl product
Packs
Packs.Destinations
  • List - List all Destinations within a Pack
  • Create - Create a Destination within a Pack
  • Get - Get a Destination within a Pack
  • Update - Update a Destination within a Pack
  • Delete - Delete a Destination within a Pack
  • Clear - Clear the persistent queue for a Destination within a Pack
  • Get - Get information about the latest job to clear the persistent queue for a Destination within a Pack
  • Get - Get sample event data for a Destination within a Pack
  • Create - Send sample event data to a Destination within a Pack
  • List - List the status of all Destinations within a Pack
  • Get - Get the status of a Destination within a Pack
Packs.Pipelines
  • List - List all Pipelines within a Pack
  • Create - Create a Pipeline within a Pack
  • Get - Get a Pipeline within a Pack
  • Update - Update a Pipeline within a Pack
  • Delete - Delete a Pipeline within a Pack
Packs.Routes
  • List - List all Routes within a Pack
  • Get - Get a Routing table within a Pack
  • Update - Update a Routing table within a Pack
  • Append - Add a Route to the end of the Routing table within a Pack
Packs.Sources
  • List - List all Sources within a Pack
  • Create - Create a Source within a Pack
  • Get - Get a Source within a Pack
  • Update - Update a Source within a Pack
  • Delete - Delete a Source within a Pack
  • Create - Add an HEC token and optional metadata to a Splunk HEC Source within a Pack
  • Update - Update metadata for an HEC token for a Splunk HEC Source within a Pack
  • Clear - Clear the persistent queue for a Source within a Pack
  • Get - Get information about the latest job to clear the persistent queue for a Source within a Pack
  • List - List the status of all Sources within a Pack
  • Get - Get the status of a Source within a Pack
Pipelines
  • List - List all Pipelines
  • Create - Create a Pipeline
  • Delete - Delete a Pipeline
  • Get - Get a Pipeline
  • Update - Update a Pipeline
Routes
  • List - List all Routes
  • Get - Get a Routing table
  • Update - Update a Routing table
  • Append - Add a Route to the end of the Routing table
Sources
Sources.HecTokens
  • Create - Add an HEC token and optional metadata to a Splunk HEC Source
  • Update - Update metadata for an HEC token for a Splunk HEC Source
Sources.Pq
  • Get - Get information about the latest job to clear the persistent queue for a Source
  • Clear - Clear the persistent queue for a Source
Sources.Statuses
  • List - List the status of all Sources
  • Get - Get the status of a Source
System.Captures
System.Settings
  • Restart - Restart the Cribl server
System.Settings.Cribl
  • List - Get system settings
  • Update - Update system settings
Versions.Branches
  • List - List all branches in the Git repository used for Cribl configuration
  • Get - Get the name of the Git branch that the Cribl configuration is checked out to
Versions.Commits
  • List - List the commit history
  • Create - Create a new commit for pending changes to the Cribl configuration
  • Diff - Get the diff for a commit
  • Push - Push local commits to the remote repository
  • Revert - Revert a commit in the local repository
  • Get - Get the diff and log message for a commit
  • Undo - Discard uncommitted (staged) changes
Versions.Commits.Files
  • Count - Get a count of files that changed since a commit
  • List - Get the names and statuses of files that changed since a commit
Versions.Configs
  • Get - Get the configuration and status for the Git integration
Versions.Statuses
  • Get - Get the status of the current working tree

Retries

Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.

To change the default retry strategy for a single API call, simply provide a retry.Config object to the call by using the WithRetries option:

package main

import (
	"context"
	criblcontrolplanesdkgo "github.com/Cribl-Community/cribl-control-plane-sdk-go"
	"github.com/Cribl-Community/cribl-control-plane-sdk-go/models/components"
	"github.com/Cribl-Community/cribl-control-plane-sdk-go/models/operations"
	"github.com/Cribl-Community/cribl-control-plane-sdk-go/retry"
	"log"
	"os"
)

func main() {
	ctx := context.Background()

	s := criblcontrolplanesdkgo.New(
		"https://api.example.com",
		criblcontrolplanesdkgo.WithSecurity(components.Security{
			BearerAuth: criblcontrolplanesdkgo.Pointer(os.Getenv("CRIBLCONTROLPLANE_BEARER_AUTH")),
		}),
	)

	res, err := s.System.Settings.Cribl.List(ctx, operations.WithRetries(
		retry.Config{
			Strategy: "backoff",
			Backoff: &retry.BackoffStrategy{
				InitialInterval: 1,
				MaxInterval:     50,
				Exponent:        1.1,
				MaxElapsedTime:  100,
			},
			RetryConnectionErrors: false,
		}))
	if err != nil {
		log.Fatal(err)
	}
	if res.CountedSystemSettingsConf != nil {
		// handle response
	}
}

If you'd like to override the default retry strategy for all operations that support retries, you can use the WithRetryConfig option at SDK initialization:

package main

import (
	"context"
	criblcontrolplanesdkgo "github.com/Cribl-Community/cribl-control-plane-sdk-go"
	"github.com/Cribl-Community/cribl-control-plane-sdk-go/models/components"
	"github.com/Cribl-Community/cribl-control-plane-sdk-go/retry"
	"log"
	"os"
)

func main() {
	ctx := context.Background()

	s := criblcontrolplanesdkgo.New(
		"https://api.example.com",
		criblcontrolplanesdkgo.WithRetryConfig(
			retry.Config{
				Strategy: "backoff",
				Backoff: &retry.BackoffStrategy{
					InitialInterval: 1,
					MaxInterval:     50,
					Exponent:        1.1,
					MaxElapsedTime:  100,
				},
				RetryConnectionErrors: false,
			}),
		criblcontrolplanesdkgo.WithSecurity(components.Security{
			BearerAuth: criblcontrolplanesdkgo.Pointer(os.Getenv("CRIBLCONTROLPLANE_BEARER_AUTH")),
		}),
	)

	res, err := s.System.Settings.Cribl.List(ctx)
	if err != nil {
		log.Fatal(err)
	}
	if res.CountedSystemSettingsConf != nil {
		// handle response
	}
}

Error Handling

Handling errors in this SDK should largely match your expectations. All operations return a response object or an error, they will never return both.

By Default, an API error will return apierrors.APIError. When custom error responses are specified for an operation, the SDK may also return their associated error. You can refer to respective Errors tables in SDK docs for more details on possible error types for each operation.

For example, the Create function may return the following errors:

Error Type Status Code Content Type
apierrors.Error 500 application/json
apierrors.APIError 4XX, 5XX */*
Example
package main

import (
	"context"
	"errors"
	criblcontrolplanesdkgo "github.com/Cribl-Community/cribl-control-plane-sdk-go"
	"github.com/Cribl-Community/cribl-control-plane-sdk-go/models/apierrors"
	"github.com/Cribl-Community/cribl-control-plane-sdk-go/models/components"
	"log"
	"os"
)

func main() {
	ctx := context.Background()

	s := criblcontrolplanesdkgo.New(
		"https://api.example.com",
		criblcontrolplanesdkgo.WithSecurity(components.Security{
			BearerAuth: criblcontrolplanesdkgo.Pointer(os.Getenv("CRIBLCONTROLPLANE_BEARER_AUTH")),
		}),
	)

	res, err := s.Lakes.Datasets.Create(ctx, "<id>", components.CriblLakeDataset{
		AcceleratedFields: []string{
			"<value 1>",
			"<value 2>",
		},
		BucketName: criblcontrolplanesdkgo.Pointer("<value>"),
		CacheConnection: &components.CacheConnection{
			AcceleratedFields: []string{
				"<value 1>",
				"<value 2>",
			},
			BackfillStatus:          components.CacheConnectionBackfillStatusPending.ToPointer(),
			CacheRef:                "<value>",
			CreatedAt:               7795.06,
			LakehouseConnectionType: components.LakehouseConnectionTypeCache.ToPointer(),
			MigrationQueryID:        criblcontrolplanesdkgo.Pointer("<id>"),
			RetentionInDays:         1466.58,
		},
		DeletionStartedAt: criblcontrolplanesdkgo.Pointer[float64](8310.58),
		Description:       criblcontrolplanesdkgo.Pointer("pleased toothbrush long brush smooth swiftly rightfully phooey chapel"),
		Format:            components.FormatOptionsCriblLakeDatasetDdss.ToPointer(),
		HTTPDAUsed:        criblcontrolplanesdkgo.Pointer(true),
		ID:                "<id>",
		Metrics: &components.LakeDatasetMetrics{
			CurrentSizeBytes: 6170.04,
			MetricsDate:      "<value>",
		},
		RetentionPeriodInDays: criblcontrolplanesdkgo.Pointer[float64](456.37),
		SearchConfig: &components.LakeDatasetSearchConfig{
			Datatypes: []string{
				"<value 1>",
			},
			Metadata: &components.DatasetMetadata{
				Earliest:           "<value>",
				EnableAcceleration: true,
				FieldList: []string{
					"<value 1>",
					"<value 2>",
				},
				LatestRunInfo: &components.DatasetMetadataRunInfo{
					EarliestScannedTime: criblcontrolplanesdkgo.Pointer[float64](4334.7),
					FinishedAt:          criblcontrolplanesdkgo.Pointer[float64](6811.22),
					LatestScannedTime:   criblcontrolplanesdkgo.Pointer[float64](5303.3),
					ObjectCount:         criblcontrolplanesdkgo.Pointer[float64](9489.04),
				},
				ScanMode: components.ScanModeDetailed,
			},
		},
		StorageLocationID: criblcontrolplanesdkgo.Pointer("<id>"),
		ViewName:          criblcontrolplanesdkgo.Pointer("<value>"),
	})
	if err != nil {

		var e *apierrors.Error
		if errors.As(err, &e) {
			// handle error
			log.Fatal(e.Error())
		}

		var e *apierrors.APIError
		if errors.As(err, &e) {
			// handle error
			log.Fatal(e.Error())
		}
	}
}

Json Streaming

Json Streaming (jsonl / x-ndjson) content type can be used to stream content from certain operations. These operations expose the stream that can be consumed using a for loop in Go. The loop will terminate when the server no longer has any events to send and closes the underlying connection.

Here's an example of consuming a JSONL stream:

package main

import (
	"context"
	criblcontrolplanesdkgo "github.com/Cribl-Community/cribl-control-plane-sdk-go"
	"github.com/Cribl-Community/cribl-control-plane-sdk-go/models/components"
	"log"
	"os"
)

func main() {
	ctx := context.Background()

	s := criblcontrolplanesdkgo.New(
		"https://api.example.com",
		criblcontrolplanesdkgo.WithSecurity(components.Security{
			BearerAuth: criblcontrolplanesdkgo.Pointer(os.Getenv("CRIBLCONTROLPLANE_BEARER_AUTH")),
		}),
	)

	res, err := s.System.Captures.Create(ctx, components.CaptureParamsReq{
		Duration:  criblcontrolplanesdkgo.Pointer[int64](5),
		Filter:    criblcontrolplanesdkgo.Pointer("sourcetype===\"pan:traffic\""),
		Level:     components.CaptureLevelBeforePreProcessingPipeline.ToPointer(),
		MaxEvents: criblcontrolplanesdkgo.Pointer[int64](100),
	})
	if err != nil {
		log.Fatal(err)
	}
	if res.CapturedEvent != nil {
		for res.CapturedEvent.Next() {
			event, _ := res.CapturedEvent.Value()
			log.Print(event)
			// Handle the event
		}
	}
}

Pagination

Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the returned response object will have a Next method that can be called to pull down the next group of results. If the return value of Next is nil, then there are no more pages to be fetched.

Here's an example of one such pagination call:

package main

import (
	"context"
	criblcontrolplanesdkgo "github.com/Cribl-Community/cribl-control-plane-sdk-go"
	"github.com/Cribl-Community/cribl-control-plane-sdk-go/models/components"
	"log"
	"os"
)

func main() {
	ctx := context.Background()

	s := criblcontrolplanesdkgo.New(
		"https://api.example.com",
		criblcontrolplanesdkgo.WithSecurity(components.Security{
			BearerAuth: criblcontrolplanesdkgo.Pointer(os.Getenv("CRIBLCONTROLPLANE_BEARER_AUTH")),
		}),
	)

	res, err := s.Functions.List(ctx, nil, nil, nil)
	if err != nil {
		log.Fatal(err)
	}
	if res.PaginatedFunctionResponse != nil {
		for {
			// handle items

			res, err = res.Next()

			if err != nil {
				// handle error
			}

			if res == nil {
				break
			}
		}
	}
}

Custom HTTP Client

The Go SDK makes API calls that wrap an internal HTTP client. The requirements for the HTTP client are very simple. It must match this interface:

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

The built-in net/http client satisfies this interface and a default client based on the built-in is provided by default. To replace this default with a client of your own, you can implement this interface yourself or provide your own client configured as desired. Here's a simple example, which adds a client with a 30 second timeout.

import (
	"net/http"
	"time"

	"github.com/Cribl-Community/cribl-control-plane-sdk-go"
)

var (
	httpClient = &http.Client{Timeout: 30 * time.Second}
	sdkClient  = criblcontrolplanesdkgo.New(criblcontrolplanesdkgo.WithClient(httpClient))
)

This can be a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(b bool) *bool

Bool provides a helper function to return a pointer to a bool

func Float32

func Float32(f float32) *float32

Float32 provides a helper function to return a pointer to a float32

func Float64

func Float64(f float64) *float64

Float64 provides a helper function to return a pointer to a float64

func Int

func Int(i int) *int

Int provides a helper function to return a pointer to an int

func Int64

func Int64(i int64) *int64

Int64 provides a helper function to return a pointer to an int64

func Pointer

func Pointer[T any](v T) *T

Pointer provides a helper function to return a pointer to a type

func String

func String(s string) *string

String provides a helper function to return a pointer to a string

Types

type ACL

type ACL struct {
	Teams *Teams
	// contains filtered or unexported fields
}

func (*ACL) Get

Get the Access Control List for a Worker Group, Outpost Group, or Edge Fleet Get the Access Control List (ACL) for the specified Worker Group, Outpost Group, or Edge Fleet.

type Auth

type Auth struct {
	Tokens *Tokens
	// contains filtered or unexported fields
}

type Branches

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

func (*Branches) Get

Get the name of the Git branch that the Cribl configuration is checked out to Get the name of the Git branch that the Cribl configuration is checked out to. Useful for verifying the active configuration branch.

func (*Branches) List

List all branches in the Git repository used for Cribl configuration Get a list of all branches in the Git repository used for Cribl configuration.

type Captures

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

func (*Captures) Create

Create - Capture live data Initiate a live data capture from Cribl Workers. Returns a stream of captured events in NDJSON format that match the parameters specified in the request body.

type Collectors

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

Collectors - Actions related to Collectors

func (*Collectors) Create

Create a Collector Create a new Collector.

func (*Collectors) Delete

Delete a Collector Delete the specified Collector.

func (*Collectors) Get

Get a Collector Get the specified Collector.

func (*Collectors) List

func (s *Collectors) List(ctx context.Context, collectorType *components.CollectorType, offset *int64, limit *int64, opts ...operations.Option) (*operations.GetSavedJobResponse, error)

List all Collectors Get a list of all Collectors.

func (*Collectors) Update

Update a Collector Update the specified Collector.<br/><br/>Provide a complete representation of the Collector that you want to update in the request body. This endpoint does not support partial updates. Cribl removes any omitted fields when updating the Collector.<br/><br/>Confirm that the configuration in your request body is correct before sending the request. If the configuration is incorrect, the updated Collector might not function as expected.

type Commits

type Commits struct {
	Files *Files
	// contains filtered or unexported fields
}

func (*Commits) Create

Create a new commit for pending changes to the Cribl configuration Create a new commit for pending changes to the Cribl configuration. Any merge conflicts indicated in the response must be resolved using Git.<br/><br/>To commit only a subset of configuration changes, specify the files to include in the commit in the <code>files</code> array.

func (*Commits) Diff

func (s *Commits) Diff(ctx context.Context, commit *string, filename *string, diffLineLimit *int64, opts ...operations.Option) (*operations.GetVersionDiffResponse, error)

Diff - Get the diff for a commit Get the diff for a commit. Default is the latest commit (HEAD).

func (*Commits) Get

func (s *Commits) Get(ctx context.Context, commit *string, filename *string, diffLineLimit *int64, opts ...operations.Option) (*operations.GetVersionShowResponse, error)

Get the diff and log message for a commit Get the diff and log message for a commit. Default is the latest commit (HEAD).

func (*Commits) List

func (s *Commits) List(ctx context.Context, count *int64, offset *int64, limit *int64, opts ...operations.Option) (*operations.GetVersionResponse, error)

List the commit history List the commit history.<br/><br/>Analogous to <code>git log</code> for the Cribl configuration, allowing you to audit and review changes over time.

func (*Commits) Push

Push local commits to the remote repository Push all local commits from the local repository to the remote repository.<br/><br/>Requires at least one local commit that has not been pushed. Returns an error if the remote repository cannot be reached or the push is rejected.

func (*Commits) Revert

Revert a commit in the local repository Revert a commit in the local repository by creating a new commit that undoes the changes introduced by the specified commit.<br/><br/>Use the <code>force</code> field to proceed even when the working directory is not clean.

func (*Commits) Undo

Undo - Discard uncommitted (staged) changes Discard all uncommitted (staged) configuration changes, resetting the working directory to the last committed state. Use only if you are certain that you do not need to preserve your local changes.<br/><br/>When applied globally (no group), triggers a Cribl restart to reload the reverted configuration. Returns <code>false</code> if the working directory is already clean.

type ConfigsVersions

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

func (*ConfigsVersions) Get

Get the configuration version for a Worker Group, Outpost Group, or Edge Fleet Get the configuration version for the specified Worker Group, Outpost Group, or Edge Fleet.

type Cribl

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

func (*Cribl) List

List - Get system settings Get the current Cribl system settings.

func (*Cribl) Update

Update system settings Update the specified Cribl system settings.<br/><br/>This endpoint supports partial updates — provide only the top-level sections (<code>api</code>, <code>workers</code>, <code>tls</code>, <code>proxy</code>, etc.) that you want to change. Omitted top-level sections are preserved unchanged.<br/><br/><b>Important:</b> while top-level sections are optional, nested objects within a section must be complete. For example, if you include <code>api</code>, you must provide its required fields (<code>host</code> and <code>port</code>).

type CriblControlPlane

type CriblControlPlane struct {
	SDKVersion string
	Auth       *Auth
	// Actions related to functions
	Functions *Functions
	// Actions related to REST server health
	Health *Health
	// Actions related to DatabaseConnections
	DatabaseConnections *DatabaseConnections
	// Actions related to Collectors
	Collectors *Collectors
	// Actions related to Packs
	Packs *Packs
	// Actions related to Pipelines
	Pipelines *Pipelines
	// Actions related to Groups
	Groups *Groups
	Nodes  *Nodes
	Lakes  *Lakes
	// Actions related to Routes
	Routes *Routes
	System *System
	// Actions related to Sources
	Sources *Sources
	// Actions related to Destinations
	Destinations *Destinations
	Versions     *Versions
	// contains filtered or unexported fields
}

CriblControlPlane - Cribl API Reference: This API Reference lists available REST endpoints, along with their supported operations for accessing, creating, updating, or deleting resources. Base URL contexts for reference: - Leader context: /api/v1 - Worker Group or Edge Fleet context: /api/v1/m/{groupName} - Host (Worker or Edge Node) context: /api/v1/w/{nodeId} - Search context: /api/v1/m/default_search

https://docs.cribl.io - See our complementary product documentation

func New

func New(serverURL string, opts ...SDKOption) *CriblControlPlane

New creates a new instance of the SDK with the provided serverURL and options

type DatabaseConnections

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

DatabaseConnections - Actions related to DatabaseConnections

func (*DatabaseConnections) Create

Create a Database Connection Create a new Database Connection.

func (*DatabaseConnections) Delete

Delete a Database Connection Delete the specified Database Connection.

func (*DatabaseConnections) Get

Get a Database Connection Get the specified Database Connection.

func (*DatabaseConnections) List

List all Database Connections Get a list of all Database Connections.

func (*DatabaseConnections) Update

Update a Database Connection Update the specified Database Connection.<br/><br/>Provide a complete representation of the Database Connection that you want to update in the request body. This endpoint does not support partial updates. Cribl removes any omitted fields when updating the Database Connection.<br/><br/>Confirm that the configuration in your request body is correct before sending the request. If the configuration is incorrect, the updated Database Connection might not function as expected.

type Datasets

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

func (*Datasets) Create

Create a Lake Dataset (Cribl.Cloud only) Create a new Lake Dataset in the specified Lake (Cribl.Cloud only).

func (*Datasets) Delete

Delete a Lake Dataset (Cribl.Cloud only) Delete the specified Lake Dataset in the specified Lake (Cribl.Cloud only).

func (*Datasets) Get

func (s *Datasets) Get(ctx context.Context, lakeID string, id string, includeMetrics *bool, opts ...operations.Option) (*operations.GetCriblLakeDatasetByLakeIDAndIDResponse, error)

Get a Lake Dataset (Cribl.Cloud only) Get the specified Lake Dataset in the specified Lake (Cribl.Cloud only).

func (*Datasets) List

List all Lake Datasets (Cribl.Cloud only) Get a list of all Lake Datasets in the specified Lake (Cribl.Cloud only).

func (*Datasets) Update

Update a Lake Dataset (Cribl.Cloud only) Update the specified Lake Dataset in the specified Lake (Cribl.Cloud only).

type Destinations

type Destinations struct {
	Pq       *DestinationsPq
	Samples  *Samples
	Statuses *DestinationsStatuses
	// contains filtered or unexported fields
}

Destinations - Actions related to Destinations

func (*Destinations) Create

Create a Destination Create a new Destination.

func (*Destinations) Delete

Delete a Destination Delete the specified Destination.

func (*Destinations) Get

Get a Destination Get the specified Destination.

func (*Destinations) List

List all Destinations Get a list of all Destinations.

func (*Destinations) Update

Update a Destination Update the specified Destination.<br/><br/>Provide a complete representation of the Destination that you want to update in the request body. This endpoint does not support partial updates. Cribl removes any omitted fields when updating the Destination.<br/><br/>Confirm that the configuration in your request body is correct before sending the request. If the configuration is incorrect, the updated Destination might not function as expected.

type DestinationsPq

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

func (*DestinationsPq) Clear

Clear the persistent queue for a Destination Clear the persistent queue (PQ) for the specified Destination.

func (*DestinationsPq) Get

Get information about the latest job to clear the persistent queue for a Destination Get information about the latest job to clear the persistent queue (PQ) for the specified Destination.

type DestinationsStatuses

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

func (*DestinationsStatuses) Get

Get the status of a Destination Get the status and optional metrics for the specified Destination.

func (*DestinationsStatuses) List

func (s *DestinationsStatuses) List(ctx context.Context, metrics *bool, type_ *bool, offset *int64, limit *int64, opts ...operations.Option) (*operations.GetOutputStatusResponse, error)

List the status of all Destinations List status information and optional metrics for all configured Destinations in the Worker Group or Edge Fleet.

type Files

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

func (*Files) Count

func (s *Files) Count(ctx context.Context, commit *string, opts ...operations.Option) (*operations.GetVersionCountResponse, error)

Count - Get a count of files that changed since a commit Get a count of the files that changed since a commit. Default is the latest commit (HEAD).

func (*Files) List

List - Get the names and statuses of files that changed since a commit Get the names and statuses of files that changed since a commit. Default is the latest commit (HEAD).

type Functions

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

Functions - Actions related to functions

func (*Functions) Get

Get a Function Get the specified Function.

func (*Functions) List

func (s *Functions) List(ctx context.Context, showHidden *bool, offset *int64, limit *int64, opts ...operations.Option) (*operations.GetFunctionsResponse, error)

List all Functions Get a list of all Functions.

type Groups

type Groups struct {
	ACL     *ACL
	Configs *GroupsConfigs
	// contains filtered or unexported fields
}

Groups - Actions related to Groups

func (*Groups) Create

Create a Worker Group, Outpost Group, or Edge Fleet Create a new Worker Group, Outpost Group, or Edge Fleet for the specified Cribl product.

func (*Groups) Delete

Delete a Worker Group, Outpost Group, or Edge Fleet Delete the specified Worker Group, Outpost Group, or Edge Fleet.

func (*Groups) Deploy

Deploy commits to a Worker Group, Outpost Group, or Edge Fleet Deploy commits to the specified Worker Group, Outpost Group, or Edge Fleet.

func (*Groups) Get

Get a Worker Group, Outpost Group, or Edge Fleet Get the specified Worker Group, Outpost Group, or Edge Fleet.

func (*Groups) List

func (s *Groups) List(ctx context.Context, product components.ProductsCore, fields *string, offset *int64, limit *int64, opts ...operations.Option) (*operations.GetProductsGroupsByProductResponse, error)

List all Worker Groups, Outpost Groups, or Edge Fleets Get a list of all Worker Groups, Outpost Groups, or Edge Fleets for the specified Cribl product.

func (*Groups) Update

Update a Worker Group, Outpost Group, or Edge Fleet Update the specified Worker Group, Outpost Group, or Edge Fleet.<br/><br/>Provide a complete representation of the Group or Fleet that you want to update in the request body. This endpoint does not support partial updates. Cribl removes any omitted fields when updating the Group or Fleet.<br/><br/>Confirm that the configuration in your request body is correct before sending the request. If the configuration is incorrect, the updated Group or Fleet might not function as expected.<br/><br/>**Warning**: Do not change the values for the following parameters in the body of PATCH requests. The request body must include the values as they appear in the <code>GET /products/{product}/groups/{id}</code> response.<br/> - <code>configVersion</code><br/> - <code>deployingWorkerCount</code><br/> - <code>incompatibleWorkerCount</code><br/> - <code>workerCount</code><br/> - <code>lookupDeployments</code>.

type GroupsConfigs

type GroupsConfigs struct {
	Versions *ConfigsVersions
	// contains filtered or unexported fields
}

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient provides an interface for supplying the SDK with a custom HTTP client

type Health

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

Health - Actions related to REST server health

func (*Health) Get

Get the health status of the server Get the current health status of the server (Leader or Worker Node). In Distributed deployments, requests routed to a Worker or Edge node using the [host context](https://docs.cribl.io/cribl-as-code/api#base-url-group-fleet-host) require a Bearer token for [authentication](https://docs.cribl.io/cribl-as-code/api-auth/).

type HecTokens

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

func (*HecTokens) Create

Create - Add an HEC token and optional metadata to a Splunk HEC Source Add an HEC token and optional metadata to the specified Splunk HEC Source.

func (*HecTokens) Update

Update metadata for an HEC token for a Splunk HEC Source Update the metadata for the specified HEC token for the specified Splunk HEC Source.

type Lakes

type Lakes struct {
	Datasets *Datasets
	// contains filtered or unexported fields
}

type Nodes

type Nodes struct {
	Summaries *Summaries
	// contains filtered or unexported fields
}

func (*Nodes) Count

Count - Get a count of Worker, Edge, or Outpost Nodes Get a count of all Worker, Edge, or Outpost Nodes for the specified Cribl product.

func (*Nodes) Get

Get detailed metadata for a Worker, Edge, or Outpost Node Get detailed metadata for the specified Worker, Edge, or Outpost Node for the specified Cribl product.

func (*Nodes) List

List - Get detailed metadata for Worker, Edge, or Outpost Nodes Get detailed metadata for Worker, Edge, or Outpost Nodes for the specified Cribl product.

func (*Nodes) Restart

Restart Worker, Edge, or Outpost Nodes Restart all Worker, Edge, or Outpost Nodes for the specified Cribl product.

type Packs

type Packs struct {
	Pipelines    *PacksPipelines
	Routes       *PacksRoutes
	Sources      *PacksSources
	Destinations *PacksDestinations
	// contains filtered or unexported fields
}

Packs - Actions related to Packs

func (*Packs) Delete

Delete - Uninstall a Pack Uninstall the specified Pack.

func (*Packs) Get

Get a Pack Get the specified Pack.

func (*Packs) Install

Install a Pack Install a Pack.<br/><br/>To install an uploaded Pack, provide the <code>source</code> value from the <code>PUT /packs</code> response as the <code>source</code> parameter in the request body.<br/><br/>To install a Pack by importing from a URL, provide the direct URL location of the <code>.crbl</code> file for the Pack as the <code>source</code> parameter in the request body.<br/><br/>To install a Pack by importing from a Git repository, provide <code>git+&lt;repo-url&gt;</code> as the <code>source</code> parameter in the request body.<br/><br/>If you do not include the <code>source</code> parameter in the request body, an empty Pack is created.

func (*Packs) List

func (s *Packs) List(ctx context.Context, with *string, offset *int64, limit *int64, opts ...operations.Option) (*operations.GetPacksResponse, error)

List all Packs Get a list of all Packs.

func (*Packs) Update

Update - Upgrade a Pack Upgrade the specified Pack.<br/><br/>If the Pack includes any user-modified versions of default Cribl Knowledge resources such as lookups, copy the modified files locally for safekeeping before upgrading the Pack. Copy the modified files back to the upgraded Pack after you install it with <code>POST /packs</code> to overwrite the default versions in the Pack.<br/><br/>After you upgrade the Pack, update any Routes, Pipelines, Sources, and Destinations that use the previous Pack version so that they reference the upgraded Pack.

func (*Packs) Upload

func (s *Packs) Upload(ctx context.Context, filename string, requestBody any, opts ...operations.Option) (*operations.UpdatePacksResponse, error)

Upload a Pack file Upload a Pack file. Returns the <code>source</code> ID needed to install the Pack with <code>POST /packs</code>, which you must call separately.

type PacksDestinations

type PacksDestinations struct {
	Pq       *PacksDestinationsPq
	Samples  *PacksSamples
	Statuses *PacksDestinationsStatuses
	// contains filtered or unexported fields
}

func (*PacksDestinations) Create

Create a Destination within a Pack Create a new Destination within the specified Pack.

func (*PacksDestinations) Delete

Delete a Destination within a Pack Delete the specified Destination within the specified Pack.

func (*PacksDestinations) Get

Get a Destination within a Pack Get the specified Destination within the specified Pack.

func (*PacksDestinations) List

List all Destinations within a Pack Get a list of all Destinations within the specified Pack.

func (*PacksDestinations) Update

Update a Destination within a Pack Update the specified Destination.<br/><br/>Provide a complete representation of the Destination that you want to update in the request body. This endpoint does not support partial updates. Cribl removes any omitted fields when updating the Destination.<br/><br/>Confirm that the configuration in your request body is correct before sending the request. If the configuration is incorrect, the updated Destination might not function as expected within the specified Pack.

type PacksDestinationsPq

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

func (*PacksDestinationsPq) Clear

Clear the persistent queue for a Destination within a Pack Clear the persistent queue (PQ) for the specified Destination within the specified Pack.

func (*PacksDestinationsPq) Get

Get information about the latest job to clear the persistent queue for a Destination within a Pack Get information about the latest job to clear the persistent queue (PQ) for the specified Destination within the specified Pack.

type PacksDestinationsStatuses

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

func (*PacksDestinationsStatuses) Get

Get the status of a Destination within a Pack Get the status and optional metrics for the specified Destination within the specified Pack.

func (*PacksDestinationsStatuses) List

List the status of all Destinations within a Pack List status information and optional metrics for all configured Destinations in the Worker Group or Edge Fleet within the specified Pack.

type PacksHecTokens

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

func (*PacksHecTokens) Create

Create - Add an HEC token and optional metadata to a Splunk HEC Source within a Pack Add an HEC token and optional metadata to the specified Splunk HEC Source within the specified Pack.

func (*PacksHecTokens) Update

Update metadata for an HEC token for a Splunk HEC Source within a Pack Update the metadata for the specified HEC token for the specified Splunk HEC Source within the specified Pack.

type PacksPipelines

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

func (*PacksPipelines) Create

Create a Pipeline within a Pack Create a new Pipeline within the specified Pack.

func (*PacksPipelines) Delete

Delete a Pipeline within a Pack Delete the specified Pipeline within the specified Pack.

func (*PacksPipelines) Get

Get a Pipeline within a Pack Get the specified Pipeline within the specified Pack.

func (*PacksPipelines) List

func (s *PacksPipelines) List(ctx context.Context, pack string, offset *int64, limit *int64, opts ...operations.Option) (*operations.GetPipelinesByPackResponse, error)

List all Pipelines within a Pack Get a list of all Pipelines within the specified Pack.

func (*PacksPipelines) Update

Update a Pipeline within a Pack Update the specified Pipeline within the specified Pack.<br/><br/>Provide a complete representation of the Pipeline that you want to update in the request body.<br/><br/>This endpoint does not support partial updates. Cribl removes any omitted fields when updating the Pipeline.<br/><br/>Confirm that the configuration in your request body is correct before sending the request.<br/><br/>If the configuration is incorrect, the updated Pipeline might not function as expected.

type PacksRoutes

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

func (*PacksRoutes) Append

Append - Add a Route to the end of the Routing table within a Pack Add a Route to the end of the specified Routing table within the specified Pack.

func (*PacksRoutes) Get

Get a Routing table within a Pack Get the specified Routing table within the specified Pack.

func (*PacksRoutes) List

List all Routes within a Pack Get a list of all Routes within the specified Pack.

func (*PacksRoutes) Update

Update a Routing table within a Pack Update the specified Routing table within the specified Pack.<br/><br/>Provide a complete representation of the Routing table that you want to update in the request body.<br/><br/>This endpoint does not support partial updates. Cribl removes any omitted fields when updating the Routing table.<br/><br/>Confirm that the configuration in your request body is correct before sending the request. If the configuration is incorrect, the updated Routing table might not function as expected.<br/><br/>Cribl also removes any omitted Routes when updating the Routing table.

type PacksSamples

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

func (*PacksSamples) Create

Create - Send sample event data to a Destination within a Pack Send sample event data to the specified Destination to validate the configuration or test connectivity within the specified Pack.

func (*PacksSamples) Get

Get sample event data for a Destination within a Pack Get sample event data for the specified Destination to validate the configuration or test connectivity within the specified Pack.

type PacksSources

type PacksSources struct {
	HecTokens *PacksHecTokens
	Pq        *PacksSourcesPq
	Statuses  *PacksSourcesStatuses
	// contains filtered or unexported fields
}

func (*PacksSources) Create

Create a Source within a Pack Create a new Source. The system-managed provenance field (JSON <code>criblSourceProvenance</code>) must be omitted from the request body within the specified Pack.

func (*PacksSources) Delete

Delete a Source within a Pack Delete the specified Source within the specified Pack.

func (*PacksSources) Get

Get a Source within a Pack Get the specified Source within the specified Pack.

func (*PacksSources) List

func (s *PacksSources) List(ctx context.Context, pack string, type_ []string, offset *int64, limit *int64, opts ...operations.Option) (*operations.GetInputSystemByPackResponse, error)

List all Sources within a Pack Get a list of all Sources within the specified Pack.

func (*PacksSources) Update

Update a Source within a Pack Update the specified Source.<br/><br/>Provide a complete representation of the Source that you want to update in the request body. This endpoint does not support partial updates. Cribl removes any omitted fields when updating the Source.<br/><br/>Confirm that the configuration in your request body is correct before sending the request. If the configuration is incorrect, the updated Source might not function as expected.<br/><br/>Cribl preserves <code>criblSourceProvenance</code> when you omit it from the request body, and you cannot overwrite it through this endpoint within the specified Pack.

type PacksSourcesPq

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

func (*PacksSourcesPq) Clear

Clear the persistent queue for a Source within a Pack Clear the persistent queue (PQ) for the specified Source within the specified Pack.

func (*PacksSourcesPq) Get

Get information about the latest job to clear the persistent queue for a Source within a Pack Get information about the latest job to clear the persistent queue (PQ) for the specified Source within the specified Pack.

type PacksSourcesStatuses

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

func (*PacksSourcesStatuses) Get

Get the status of a Source within a Pack Get the status and optional metrics for the specified Source within the specified Pack.

func (*PacksSourcesStatuses) List

List the status of all Sources within a Pack List status information and optional metrics for all configured Sources in the Worker Group or Edge Fleet within the specified Pack.

type Pipelines

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

Pipelines - Actions related to Pipelines

func (*Pipelines) Create

Create a Pipeline Create a new Pipeline.

func (*Pipelines) Delete

Delete a Pipeline Delete the specified Pipeline.

func (*Pipelines) Get

Get a Pipeline Get the specified Pipeline.

func (*Pipelines) List

func (s *Pipelines) List(ctx context.Context, offset *int64, limit *int64, opts ...operations.Option) (*operations.GetPipelinesResponse, error)

List all Pipelines Get a list of all Pipelines.

func (*Pipelines) Update

Update a Pipeline Update the specified Pipeline.<br/><br/>Provide a complete representation of the Pipeline that you want to update in the request body.<br/><br/>This endpoint does not support partial updates. Cribl removes any omitted fields when updating the Pipeline.<br/><br/>Confirm that the configuration in your request body is correct before sending the request.<br/><br/>If the configuration is incorrect, the updated Pipeline might not function as expected.

type Routes

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

Routes - Actions related to Routes

func (*Routes) Append

Append - Add a Route to the end of the Routing table Add a Route to the end of the specified Routing table.

func (*Routes) Get

Get a Routing table Get the specified Routing table.

func (*Routes) List

List all Routes Get a list of all Routes.

func (*Routes) Update

Update a Routing table Update the specified Routing table.<br/><br/>Provide a complete representation of the Routing table that you want to update in the request body.<br/><br/>This endpoint does not support partial updates. Cribl removes any omitted fields when updating the Routing table.<br/><br/>Confirm that the configuration in your request body is correct before sending the request. If the configuration is incorrect, the updated Routing table might not function as expected.<br/><br/>Cribl also removes any omitted Routes when updating the Routing table.

type SDKOption

type SDKOption func(*CriblControlPlane)

func WithClient

func WithClient(client HTTPClient) SDKOption

WithClient allows the overriding of the default HTTP client used by the SDK

func WithRetryConfig

func WithRetryConfig(retryConfig retry.Config) SDKOption

func WithSecurity

func WithSecurity(security components.Security) SDKOption

WithSecurity configures the SDK to use the provided security details

func WithSecuritySource

func WithSecuritySource(security func(context.Context) (components.Security, error)) SDKOption

WithSecuritySource configures the SDK to invoke the Security Source function on each method call to determine authentication

func WithServerURL

func WithServerURL(serverURL string) SDKOption

WithServerURL allows providing an alternative server URL

func WithTemplatedServerURL

func WithTemplatedServerURL(serverURL string, params map[string]string) SDKOption

WithTemplatedServerURL allows the overriding of the default server URL with a templated URL populated with the provided parameters

func WithTimeout

func WithTimeout(timeout time.Duration) SDKOption

WithTimeout Optional request timeout applied to each operation

type Samples

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

func (*Samples) Create

Create - Send sample event data to a Destination Send sample event data to the specified Destination to validate the configuration or test connectivity.

func (*Samples) Get

Get sample event data for a Destination Get sample event data for the specified Destination to validate the configuration or test connectivity.

type Settings

type Settings struct {
	Cribl *Cribl
	// contains filtered or unexported fields
}

func (*Settings) Restart

Restart the Cribl server Restart the Cribl server.<br/><br/>This operation requires <code>system.restart</code> to be set to <code>api</code> in <code>cribl.yml</code>. If this setting is not configured, the request returns a <code>403</code> error.<br/><br/>Restarting the server causes a brief period of downtime while the process stops and restarts. All in-flight events are drained before the process exits. Use <code>POST /system/settings/reload</code> to apply configuration changes without a full restart.

type Sources

type Sources struct {
	HecTokens *HecTokens
	Pq        *SourcesPq
	Statuses  *SourcesStatuses
	// contains filtered or unexported fields
}

Sources - Actions related to Sources

func (*Sources) Create

Create a Source Create a new Source. The system-managed provenance field (JSON <code>criblSourceProvenance</code>) must be omitted from the request body.

func (*Sources) Delete

Delete a Source Delete the specified Source.

func (*Sources) Get

Get a Source Get the specified Source.

func (*Sources) List

func (s *Sources) List(ctx context.Context, type_ []string, offset *int64, limit *int64, opts ...operations.Option) (*operations.ListInputResponse, error)

List all Sources Get a list of all Sources.

func (*Sources) Update

Update a Source Update the specified Source.<br/><br/>Provide a complete representation of the Source that you want to update in the request body. This endpoint does not support partial updates. Cribl removes any omitted fields when updating the Source.<br/><br/>Confirm that the configuration in your request body is correct before sending the request. If the configuration is incorrect, the updated Source might not function as expected.<br/><br/>Cribl preserves <code>criblSourceProvenance</code> when you omit it from the request body, and you cannot overwrite it through this endpoint.

type SourcesPq

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

func (*SourcesPq) Clear

Clear the persistent queue for a Source Clear the persistent queue (PQ) for the specified Source.

func (*SourcesPq) Get

Get information about the latest job to clear the persistent queue for a Source Get information about the latest job to clear the persistent queue (PQ) for the specified Source.

type SourcesStatuses

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

func (*SourcesStatuses) Get

Get the status of a Source Get the status and optional metrics for the specified Source.

func (*SourcesStatuses) List

func (s *SourcesStatuses) List(ctx context.Context, metrics *bool, type_ *bool, offset *int64, limit *int64, opts ...operations.Option) (*operations.GetInputStatusResponse, error)

List the status of all Sources List status information and optional metrics for all configured Sources in the Worker Group or Edge Fleet.

type Summaries

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

func (*Summaries) Get

Get a summary of the deployment for a Cribl product Get a summary of the deployment for the specified Cribl product (Stream or Edge).<br/><br/>The summary includes a count of Worker Groups or Edge Fleets and resources such as Pipelines, Routes, Sources, and Destinations. For Distributed deployments, the summary also includes a count and statistics for Worker or Edge Nodes.

type System

type System struct {
	Captures *Captures
	Settings *Settings
	// contains filtered or unexported fields
}

type Teams

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

func (*Teams) Get

Get the Access Control List for teams with permissions on a Worker Group, Outpost Group, or Edge Fleet for the specified Cribl product Get the Access Control List (ACL) for teams that have permissions on a Worker Group, Outpost Group, or Edge Fleet for the specified Cribl product.

type Tokens

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

func (*Tokens) Get

Get - Log in and fetch an authentication token This endpoint is unavailable on Cribl.Cloud. Instead, follow the instructions at https://docs.cribl.io/stream/api-tutorials/#criblcloud to get an Auth token for Cribl.Cloud.

type Versions

type Versions struct {
	Commits  *Commits
	Branches *Branches
	Configs  *VersionsConfigs
	Statuses *VersionsStatuses
	// contains filtered or unexported fields
}

type VersionsConfigs

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

func (*VersionsConfigs) Get

Get the configuration and status for the Git integration Get the configuration and versioning status for the Git integration for the Cribl configuration.

type VersionsStatuses

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

func (*VersionsStatuses) Get

Get the status of the current working tree Get the status of the current working tree of the Git repository used for Cribl configuration. The response includes details about modified, staged, untracked, and conflicted files, as well as branch and remote tracking information.

Directories

Path Synopsis
internal
models

Jump to

Keyboard shortcuts

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