streams

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLogStream

func CreateLogStream(client *golangsdk.ServiceClient, opts CreateOpts) (string, error)

func DeleteLogStream

func DeleteLogStream(client *golangsdk.ServiceClient, opts DeleteOpts) (err error)

DeleteLogStream a log topic by id

Types

type CreateOpts

type CreateOpts struct {
	// ID of a created log group
	GroupId string `json:"-" required:"true"`
	// Name of the log stream to be created.
	// Minimum length: 1 character
	// Maximum length: 64 characters
	// Enumerated value:
	// lts-stream-13ci
	LogStreamName string `json:"log_stream_name" required:"true"`
}

type DeleteOpts

type DeleteOpts struct {
	// ID of a created log group
	GroupId string
	// ID of a created log stream
	StreamId string
}

type ListLogsOpts

type ListLogsOpts struct {
	GroupId  string `json:"-" required:"true"`
	StreamId string `json:"-" required:"true"`
	// UTC start time of the search window (in milliseconds).
	// NOTE:
	// Maximum query time range: 30 days
	StartTime string `json:"start_time" required:"true"`
	// UTC end time of the search window (in milliseconds).
	// NOTE:
	// Maximum query time range: 30 days
	EndTime string `json:"end_time" required:"true"`
	// Filter criteria, which vary between log sources.
	Labels map[string]string `json:"labels,omitempty"`
	// Keyword used for search. A keyword is a word between two adjacent delimiters.
	// Enumerated value:
	// error
	Keywords string `json:"keywords,omitempty"`
	// Sequence number of a log event. This parameter is not required for the first query, but is required for subsequent pagination queries. The value can be obtained from the response of the last query. The value of line_num should be between the values of start_time and end_time.
	// Value length: 19 characters
	LineNum string `json:"line_num,omitempty"`
	// Whether the search order is descending or ascending. The default value is false, indicating that search results are displayed in ascending order.
	// Enumerated value:
	// false
	IsDesc *bool `json:"is_desc,omitempty"`
	// The value is init (default value) for the first query, or forwards or backwards for a pagination query. This parameter is used together with is_desc for pagination queries.
	// Enumerated value:
	// forwards
	SearchType string `json:"search_type,omitempty"`
	// Number of logs to be queried each time. The value is 50 when this parameter is not set. You are advised to set this parameter to 100.
	//
	// Minimum value: 1
	// Maximum value: 5000
	Limit int32 `json:"limit,omitempty"`
}

type ListLogsResponse

type ListLogsResponse struct {
	Count int           `json:"count,omitempty"`
	Logs  []LogContents `json:"logs,omitempty"`
}

func ListLogs

func ListLogs(client *golangsdk.ServiceClient, opts ListLogsOpts) (*ListLogsResponse, error)

type LogContents

type LogContents struct {
	// Raw log data.
	// Minimum length: 1 character
	// Maximum length: 10,000 characters
	Content string `json:"content,omitempty"`
	// Sequence number of a log event.
	// Value length: 19 characters
	LineNum string `json:"line_num,omitempty"`
	// Labels contained in a log event. The labels vary depending on log events.
	Labels map[string]string `json:"labels,omitempty"`
}

type LogStream

type LogStream struct {
	// Creation time.
	// Minimum value: 1577808000000
	// Maximum value: 4102416000000
	CreationTime int64 `json:"creation_time"`
	// Log stream name.
	// Value length: 36 characters
	LogStreamName string `json:"log_stream_name"`
	// Log stream ID.
	// Value length: 36 characters
	LogStreamId string `json:"log_stream_id"`
	// Number of filters.
	// Minimum value: 0
	// Maximum value: 5
	FilterCount int32 `json:"filter_count"`
	// Log stream tag.
	Tag map[string]string `json:"tag,omitempty"`
}

func ListLogStream

func ListLogStream(client *golangsdk.ServiceClient, groupId string) ([]LogStream, error)

Jump to

Keyboard shortcuts

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