api

package
v0.9.40 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DEFAULT_PREFIX   = bce.URI_PREFIX + "v1" + bce.URI_PREFIX + "logstore"
	FASTQUERY_PREFIX = bce.URI_PREFIX + "v1" + bce.URI_PREFIX + "fastquery"
)

Variables

This section is empty.

Functions

func CreateFastQuery

func CreateFastQuery(cli bce.Client, body *bce.Body) error

CreateFastQuery - create a fastQuery

PARAMS:

  • cli: the client agent which can perform sending request
  • body: the fastQuery body

RETURNS:

  • error: nil if success otherwise the specific error

func CreateIndex

func CreateIndex(cli bce.Client, logStoreName string, body *bce.Body) error

CreateIndex - create index for logStore

PARAMS:

  • cli: the client agent which can perform sending request
  • logStoreName: logStore needs to be indexed
  • body: index mappings body

RETURNS:

  • error: nil if success otherwise the specific error

func CreateLogStore

func CreateLogStore(cli bce.Client, body *bce.Body) error

CreateLogStore - create logStore

PARAMS:

  • cli: the client agent which can perform sending request
  • body: logStore parameters body

RETURNS:

  • error: nil if success otherwise the specific error

func DeleteFastQuery

func DeleteFastQuery(cli bce.Client, fastQueryName string) error

DeleteFastQuery - delete specific fastQuery

PARAMS:

  • cli: the client agent which can perform sending request
  • fastQueryName: fastQuery name to delete

RETURNS:

  • error: nil if success otherwise the specific error

func DeleteIndex

func DeleteIndex(cli bce.Client, logStoreName string) error

DeleteIndex - delete index for logStore

PARAMS:

  • cli: the client agent which can perform sending request
  • logStoreName: logStore to be deleted

RETURNS:

  • error: nil if success otherwise the specific error

func DeleteLogStore

func DeleteLogStore(cli bce.Client, logStore string) error

DeleteLogStore - delete logStore

PARAMS:

  • cli: the client agent which can perform sending request
  • logStore: logStore to delete

RETURNS:

  • error: nil if success otherwise the specific error

func PushLogRecord

func PushLogRecord(cli bce.Client, logStore string, body *bce.Body) error

PushLogRecord - push logRecords into logStore

PARAMS:

  • cli: the client agent which can perform sending request
  • logStore: target logStore to store logRecords
  • body: logRecord body

RETURNS:

  • error: nil if success otherwise the specific error

func UpdateFastQuery

func UpdateFastQuery(cli bce.Client, body *bce.Body, fastQueryName string) error

UpdateFastQuery - update specific fastQuery info

PARAMS:

  • cli: the client agent which can perform sending request
  • body: update fastQuery body
  • fastQueryName: fastQuery to update

RETURNS:

  • error: nil if success otherwise the specific error

func UpdateIndex

func UpdateIndex(cli bce.Client, logStoreName string, body *bce.Body) error

UpdateIndex - update index info

PARAMS:

  • cli: the client agent which can perform sending request
  • logStoreName: logStore needs to be updated
  • body: index mappings body

RETURNS:

  • error: nil if success otherwise the specific error

func UpdateLogStore

func UpdateLogStore(cli bce.Client, logStore string, body *bce.Body) error

UpdateLogStore - update logStore retention

PARAMS:

  • cli: the client agent which can perform sending request
  • logStore: logStore to update
  • body: logStore parameters body

RETURNS:

  • error: nil if success otherwise the specific error

Types

type CreateFastQueryBody

type CreateFastQueryBody struct {
	FastQueryName string `json:"fastQueryName"`
	Query         string `json:"query"`
	Description   string `json:"description"`
	LogStoreName  string `json:"logStoreName"`
	LogStreamName string `json:"logStreamName"`
}

type DataSetScanInfo

type DataSetScanInfo struct {
	IsTruncated     bool        `json:"isTruncated"`
	TruncatedReason string      `json:"truncatedReason"`
	Statistics      *Statistics `json:"statistics"`
}

type DateTime

type DateTime string

type FastQuery

type FastQuery struct {
	CreationDateTime DateTime `json:"creationDateTime"`
	LastModifiedTime DateTime `json:"lastModifiedTime"`
	FastQueryName    string   `json:"fastQueryName"`
	Description      string   `json:"description"`
	Query            string   `json:"query"`
	LogStoreName     string   `json:"logStoreName"`
	LogStreamName    string   `json:"logStreamName"`
}

func DescribeFastQuery

func DescribeFastQuery(cli bce.Client, fastQueryName string) (*FastQuery, error)

DescribeFastQuery - get specific fastQuery info

PARAMS:

  • cli: the client agent which can perform sending request
  • fastQueryName: fastQuery name to get

RETURNS:

  • *FastQuery: target fastQuery info
  • error: nil if success otherwise the specific error

type Histogram

type Histogram struct {
	Interval      int      `json:"interval"`
	StartDateTime DateTime `json:"startDatetime"`
	EndDateTime   DateTime `json:"endDateTime"`
	Counts        []int    `json:"counts"`
}

type IndexFields

type IndexFields struct {
	FullText bool                `json:"fulltext"`
	Fields   map[string]LogField `json:"fields"`
}

func DescribeIndex

func DescribeIndex(cli bce.Client, logStoreName string) (*IndexFields, error)

DescribeIndex - get specific logStore index info

PARAMS:

  • cli: the client agent which can perform sending request
  • logStoreName: logStore needs to be get

RETURNS:

  • *IndexFields: index mappings info
  • error: nil if success otherwise the specific error

type ListFastQueryResult

type ListFastQueryResult struct {
	Order      string      `json:"order"`
	OrderBy    string      `json:"orderBy"`
	PageNo     int         `json:"pageNo"`
	PageSize   int         `json:"pageSize"`
	TotalCount int         `json:"totalCount"`
	Result     []FastQuery `json:"result"`
}

func ListFastQuery

func ListFastQuery(cli bce.Client, args *QueryConditions) (*ListFastQueryResult, error)

ListFastQuery - get all fastQuery info

PARAMS:

  • cli: the client agent which can perform sending request
  • args: query args to get pattern-match fastQuery

RETURNS:

  • *ListFastQueryResult: pattern-match fastQuery result
  • error: nil if success otherwise the specific error

type ListLogStoreResult

type ListLogStoreResult struct {
	Order      string     `json:"order"`
	OrderBy    string     `json:"orderBy"`
	PageNo     int        `json:"pageNo"`
	PageSize   int        `json:"pageSize"`
	TotalCount int        `json:"totalCount"`
	Result     []LogStore `json:"result"`
}

func ListLogStore

func ListLogStore(cli bce.Client, args *QueryConditions) (*ListLogStoreResult, error)

ListLogStore - get all pattern-match logStore info

PARAMS:

  • cli: the client agent which can perform sending request
  • args: conditions logStore should match

RETURNS:

  • *ListLogStoreResult: logStore result set
  • error: nil if success otherwise the specific error

type ListLogStreamResult

type ListLogStreamResult struct {
	Order      string      `json:"order"`
	OrderBy    string      `json:"orderBy"`
	PageNumebr int         `json:"pageNo"`
	PageSize   int         `json:"pageSize"`
	TotalCount int         `json:"totalCount"`
	Result     []LogStream `json:"result"`
}

func ListLogStream

func ListLogStream(cli bce.Client, logStore string, args *QueryConditions) (*ListLogStreamResult, error)

ListLogStream - get all pattern-match logStream in logStore

PARAMS:

  • cli: the client agent which can perform sending request
  • logStore: logStore to parse
  • args: conditions logStream should match

RETURNS:

  • *ListLogStreamResult: pattern-match logStream result set
  • error: nil if success otherwise the specific error

type LogField

type LogField struct {
	Type   string              `json:"type"`
	Fields map[string]LogField `json:"fields,omitempty"`
}

type LogRecord

type LogRecord struct {
	Message   string `json:"message"`
	Timestamp int64  `json:"timestamp"`
	Sequence  int    `json:"sequence"`
}

type LogStore

type LogStore struct {
	CreationDateTime DateTime `json:"creationDateTime"`
	LastModifiedTime DateTime `json:"lastModifiedTime"`
	LogStoreName     string   `json:"logStoreName"`
	Retention        int      `json:"retention"`
}

func DescribeLogStore

func DescribeLogStore(cli bce.Client, logStore string) (*LogStore, error)

DescribeLogStore - get logStore info

PARAMS:

  • cli: the client agent which can perform sending request
  • logStore: logStore to get

RETURNS:

  • *LogStore: logStore info
  • error: nil if success otherwise the specific error

type LogStream

type LogStream struct {
	CreationDateTime DateTime `json:"creationDateTime"`
	LogStreamName    string   `json:"logStreamName"`
}

type PullLogRecordArgs

type PullLogRecordArgs struct {
	LogStreamName string   `json:"logStreamName"`
	StartDateTime DateTime `json:"startDatetime"`
	EndDateTime   DateTime `json:"endDateTime"`
	Limit         int      `json:"limit"`
	Marker        string   `json:"marker"`
}

type PullLogRecordResult

type PullLogRecordResult struct {
	Result      []LogRecord `json:"result"`
	IsTruncated bool        `json:"isTruncated"`
	Marker      string      `json:"marker"`
	NextMarker  string      `json:"nextMarker"`
}

func PullLogRecord

func PullLogRecord(cli bce.Client, logStore string, args *PullLogRecordArgs) (*PullLogRecordResult, error)

PullLogRecord - get logRecords from logStore

PARAMS:

  • cli: the client agent which can perform sending request
  • logStore: target logStore to get logRecords
  • args: pull logRecords limitation args

RETURNS:

  • *PullLogRecordResult: pull logRecord result set
  • error: nil if success otherwise the specific error

type PushLogRecordBody

type PushLogRecordBody struct {
	LogStreamName string      `json:"logStreamName"`
	Type          string      `json:"type"`
	LogRecords    []LogRecord `json:"logRecords"`
}

type QueryConditions

type QueryConditions struct {
	NamePattern string `json:"namePattern"`
	Order       string `json:"order"`
	OrderBy     string `json:"orderBy"`
	PageNo      int    `json:"pageNo"`
	PageSize    int    `json:"pageSize"`
}

type QueryLogRecordArgs

type QueryLogRecordArgs struct {
	LogStreamName string   `json:"logStreamName"`
	Query         string   `json:"query"`
	StartDateTime DateTime `json:"startDatetime"`
	EndDateTime   DateTime `json:"endDateTime"`
	Limit         int      `json:"limit"`
}

type QueryLogResult

type QueryLogResult struct {
	ResultSet       *ResultSet       `json:"resultSet"`
	DataSetScanInfo *DataSetScanInfo `json:"dataScanInfo"`
}

func QueryLogRecord

func QueryLogRecord(cli bce.Client, logStore string, args *QueryLogRecordArgs) (*QueryLogResult, error)

QueryLogRecord - retrieve logRecords from logStore

PARAMS:

  • cli: the client agent which can perform sending request
  • logStore: target logStore to retrieve logRecords
  • args: query logRecords conditions args

RETURNS:

  • *QueryLogResult: query logRecord result set
  • error: nil if success otherwise the specific error

type ResultSet

type ResultSet struct {
	Columns         []string        `json:"columns"`
	Rows            [][]interface{} `json:"rows"`
	IsTruncated     bool            `json:"isTruncated"`
	TruncatedReason string          `json:"truncatedReason"`
}

type Statistics

type Statistics struct {
	ExecutionTimeInMs int        `json:"executionTimeInMs"`
	ScanCount         int        `json:"scanCount"`
	Histogram         *Histogram `json:"histogram"`
}

type UpdateFastQueryBody

type UpdateFastQueryBody struct {
	Query         string `json:"query"`
	Description   string `json:"description"`
	LogStoreName  string `json:"logStoreName"`
	LogStreamName string `json:"logStreamName"`
}

Jump to

Keyboard shortcuts

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