sideeyeclient

package
v0.0.0-...-bbc83da Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ENV_TENANT_TOKEN = "SIDE_EYE_TOKEN"
)

Variables

This section is empty.

Functions

func RecordingsURL

func RecordingsURL(environment string) string

RecordingsURL returns the URL of the Side-Eye app's recordings page. If an environment is specified, the URL will point to a view filtered to that environment's snapshots. If environment is empty, the URL will point to all snapshots.

Types

type BinaryStrippedError

type BinaryStrippedError = apiclient.BinaryStrippedError

type EnvMissingError

type EnvMissingError = apiclient.EnvMissingError

type NoAgentsError

type NoAgentsError = apiclient.NoAgentsError

type NoProcessesError

type NoProcessesError = apiclient.NoProcessesError

type SideEyeClient

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

SideEyeClient is a client for the Side-Eye service.

func NewSideEyeClient

func NewSideEyeClient(option ...SideEyeClientOption) (*SideEyeClient, error)

NewSideEyeClient creates a new SideEyeClient. WithApiToken or WithApiTokenFromEnv need to specified as an option to authenticate with the Side-Eye service.

Close() needs to be called on the client when it is no longer needed to release resources.

func (*SideEyeClient) CaptureSnapshot

func (c *SideEyeClient) CaptureSnapshot(
	ctx context.Context, envName string,
) (SnapshotResult, error)

CaptureSnapshot captures a snapshot of all the monitored processes in the requested environment. If envName is empty, it refers to all the processes reported by agents not configured with an environment.

Besides generic errors, CaptureSnapshot can return NoAgentsError, EnvMissingError, NoProcessesError or BinaryStrippedError.

func (*SideEyeClient) Close

func (c *SideEyeClient) Close()

Close closes the client's network connection.

type SideEyeClientOption

type SideEyeClientOption interface {
	// contains filtered or unexported methods
}

SideEyeClientOption is the interface implemented by options for NewSideEyeClient.

type SnapshotResult

type SnapshotResult = apiclient.SnapshotResult

type WithApiToken

type WithApiToken string

WithApiToken is a string option for NewSideEyeClient that specifies the API token to use for authentication to the Side-Eye service.

type WithApiTokenFromEnv

type WithApiTokenFromEnv struct{}

WithApiTokenFromEnv is an option for NewSideEyeClient that specifies that the API token to use for authentication to the Side-Eye service should be read from the SIDE_EYE_TOKEN environment variable. If that variable is not set, NewSideEyeClient will return an error.

Jump to

Keyboard shortcuts

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