tracker

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(client *golangsdk.ServiceClient, trackerName string) (err error)

Delete will permanently delete a particular tracker.

Types

type CreateOpts

type CreateOpts struct {
	// Tracker type. The value can be system (management tracker).
	TrackerType string `json:"tracker_type" required:"true"`
	// Tracker name. When tracker_type is set to system, the default value system is used.
	TrackerName string `json:"tracker_name" required:"true"`
	// Configurations of an OBS bucket to which traces will be transferred.
	ObsInfo ObsInfo `json:"obs_info,omitempty"`
	// Indicates whether to enable trace analysis.
	IsLtsEnabled bool `json:"is_lts_enabled,omitempty"`
}

type Lts

type Lts struct {
	// Whether trace analysis is enabled.
	IsLtsEnabled bool `json:"is_lts_enabled"`
	// Name of the Log Tank Service (LTS) log group.
	LogGroupName string `json:"log_group_name"`
	// Name of the LTS log stream.
	LogTopicName string `json:"log_topic_name"`
}

type ObsInfo

type ObsInfo struct {
	// OBS bucket name. The value contains 3 to 63 characters and must start with a digit or lowercase letter.
	// Only lowercase letters, digits, hyphens (-), and periods (.) are allowed.
	BucketName string `json:"bucket_name,omitempty"`
	// Prefix of trace files that need to be stored in OBS buckets.
	// The value can contain 0 to 64 characters, including letters, digits, hyphens (-), underscores (_), and periods (.).
	FilePrefixName string `json:"file_prefix_name,omitempty"`
	// Whether the OBS bucket is automatically created by the tracker.
	IsObsCreated *bool `json:"is_obs_created,omitempty"`
	// Duration that traces are stored in the OBS bucket. When tracker_type is set to system,
	// the default value is 0, indicating permanent storage.
	BucketLifecycle *int `json:"bucket_lifecycle,omitempty"`
}

type Tracker

type Tracker struct {
	// Unique tracker ID.
	Id string `json:"id"`
	// Timestamp when the tracker was created.
	CreateTime int64 `json:"create_time"`
	// Trace analysis
	Lts Lts `json:"lts"`
	// Tracker type
	TrackerType string `json:"tracker_type"`
	// Account ID
	DomainId string `json:"domain_id"`
	// Project id
	ProjectId string `json:"project_id"`
	// Tracker name
	TrackerName string `json:"tracker_name"`
	// Tracker status
	Status string `json:"status"`
	// This parameter is returned only when the tracker status is error.
	Detail string `json:"detail"`
	// Tracker type
	ObsInfo ObsInfo `json:"obs_info"`
}

func Create

func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*Tracker, error)

func List

func List(client *golangsdk.ServiceClient, trackerName string) ([]Tracker, error)

func Update

func Update(client *golangsdk.ServiceClient, opts UpdateOpts) (*Tracker, error)

type UpdateOpts

type UpdateOpts struct {
	// Tracker type. The value can be system (management tracker).
	TrackerType string `json:"tracker_type" required:"true"`
	// Tracker name. When tracker_type is set to system, the default value system is used.
	TrackerName string `json:"tracker_name" required:"true"`
	// Configurations of an OBS bucket to which traces will be transferred.
	ObsInfo ObsInfo `json:"obs_info,omitempty"`
	// Indicates whether to enable trace analysis.
	IsLtsEnabled *bool `json:"is_lts_enabled,omitempty"`
	// Status of a tracker. The value can be enabled or disabled.
	// If you change the value to disabled, the tracker stops recording traces.
	Status string `json:"status,omitempty"`
}

Jump to

Keyboard shortcuts

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