sls

package
v0.0.0-...-1ab4e63 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2016 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package sls is a generated protocol buffer package.

It is generated from these files:

sls.proto

It has these top-level messages:

Log
LogGroup
LogGroupList

Index

Constants

View Source
const (
	SLSDefaultEndpoint = "sls.aliyuncs.com"
	SLSAPIVersion      = "0.6.0"
	METHOD_GET         = "GET"
	METHOD_POST        = "POST"
	METHOD_PUT         = "PUT"
	METHOD_DELETE      = "DELETE"
)
View Source
const HeaderSLSPrefix1 = "x-log-"
View Source
const HeaderSLSPrefix2 = "x-acs-"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(region common.Region, internal bool, accessKeyId, accessKeySecret string) *Client

NewClient creates a new instance of ECS client

func (*Client) CreateProject

func (client *Client) CreateProject(name string, description string) error

func (*Client) DeleteProject

func (client *Client) DeleteProject(name string) error

func (*Client) Project

func (client *Client) Project(name string) (*Project, error)

func (*Client) PutLogs

func (client *Client) PutLogs(putLogRequest *PutLogsRequest) error

type Error

type Error struct {
	StatusCode int
	Code       string `json:"errorCode,omitempty"`
	Message    string `json:"errorMessage,omitempty"`
}

func (*Error) Error

func (err *Error) Error() string

type GroupAttribute

type GroupAttribute struct {
	Topic        string `json:"groupTopic,omitempty"`
	ExternalName string `json:"externalName,omitempty"`
}

type IndexConfig

type IndexConfig struct {
	TTL           int                       `json:"ttl,omitempty"`
	LineConfig    IndexLineConfig           `json:"line,omitempty"`
	KeyConfigList map[string]IndexKeyConfig `json:"keys,omitempty"`
}

type IndexKeyConfig

type IndexKeyConfig struct {
	TokenList     []string `json:"token,omitempty"`
	CaseSensitive bool     `json:"caseSensitive,omitempty"`
}

type IndexLineConfig

type IndexLineConfig struct {
	TokenList     []string `json:"token,omitempty"`
	CaseSensitive bool     `json:"caseSensitive"`
	IncludeKeys   []string `json:"include_keys,omitempty"`
	Exclude_keys  []string `json:"exclude_keys,omitempty"`
}

type Log

type Log struct {
	Time             *uint32        `protobuf:"varint,1,req,name=time" json:"time,omitempty"`
	Contents         []*Log_Content `protobuf:"bytes,2,rep,name=contents" json:"contents,omitempty"`
	XXX_unrecognized []byte         `json:"-"`
}

func (*Log) Descriptor

func (*Log) Descriptor() ([]byte, []int)

func (*Log) GetContents

func (m *Log) GetContents() []*Log_Content

func (*Log) GetTime

func (m *Log) GetTime() uint32

func (*Log) ProtoMessage

func (*Log) ProtoMessage()

func (*Log) Reset

func (m *Log) Reset()

func (*Log) String

func (m *Log) String() string

type LogGroup

type LogGroup struct {
	Logs             []*Log  `protobuf:"bytes,1,rep,name=logs" json:"logs,omitempty"`
	Reserved         *string `protobuf:"bytes,2,opt,name=reserved" json:"reserved,omitempty"`
	Topic            *string `protobuf:"bytes,3,opt,name=topic" json:"topic,omitempty"`
	Source           *string `protobuf:"bytes,4,opt,name=source" json:"source,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*LogGroup) Descriptor

func (*LogGroup) Descriptor() ([]byte, []int)

func (*LogGroup) GetLogs

func (m *LogGroup) GetLogs() []*Log

func (*LogGroup) GetReserved

func (m *LogGroup) GetReserved() string

func (*LogGroup) GetSource

func (m *LogGroup) GetSource() string

func (*LogGroup) GetTopic

func (m *LogGroup) GetTopic() string

func (*LogGroup) ProtoMessage

func (*LogGroup) ProtoMessage()

func (*LogGroup) Reset

func (m *LogGroup) Reset()

func (*LogGroup) String

func (m *LogGroup) String() string

type LogGroupList

type LogGroupList struct {
	LogGroupList     []*LogGroup `protobuf:"bytes,1,rep,name=logGroupList" json:"logGroupList,omitempty"`
	XXX_unrecognized []byte      `json:"-"`
}

func (*LogGroupList) Descriptor

func (*LogGroupList) Descriptor() ([]byte, []int)

func (*LogGroupList) GetLogGroupList

func (m *LogGroupList) GetLogGroupList() []*LogGroup

func (*LogGroupList) ProtoMessage

func (*LogGroupList) ProtoMessage()

func (*LogGroupList) Reset

func (m *LogGroupList) Reset()

func (*LogGroupList) String

func (m *LogGroupList) String() string

type Log_Content

type Log_Content struct {
	Key              *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"`
	Value            *string `protobuf:"bytes,2,req,name=value" json:"value,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*Log_Content) Descriptor

func (*Log_Content) Descriptor() ([]byte, []int)

func (*Log_Content) GetKey

func (m *Log_Content) GetKey() string

func (*Log_Content) GetValue

func (m *Log_Content) GetValue() string

func (*Log_Content) ProtoMessage

func (*Log_Content) ProtoMessage()

func (*Log_Content) Reset

func (m *Log_Content) Reset()

func (*Log_Content) String

func (m *Log_Content) String() string

type Logstore

type Logstore struct {
	TTL   int    `json:"ttl,omitempty"`
	Shard int    `json:"shardCount,omitempty"`
	Name  string `json:"logstoreName,omitempty"`
}

type LogstoreList

type LogstoreList struct {
	Count     int      `json:"count,omitempty"`
	Total     int      `json:"total,omitempty"`
	Logstores []string `json:"logstores,omitempty"`
}

type LogtailConfig

type LogtailConfig struct {
	Name         string        `json:"configName,omitempty"`
	InputType    string        `json:"inputType,omitempty"`
	InputDetail  LogtailInput  `json:"inputDetail,omitempty"`
	OutputType   string        `json:"outputType,omitempty"`
	Sample       string        `json:"logSample,omitempty"`
	OutputDetail LogtailOutput `json:"outputDetail,omitempty"`
}

type LogtailConfigList

type LogtailConfigList struct {
	Count   int      `json:"count,omitempty"`
	Total   int      `json:"total,omitempty"`
	Configs []string `json:"configs,omitempty"`
}

type LogtailInput

type LogtailInput struct {
	LogType       string   `json:"logType,omitempty"`
	LogPath       string   `json:"logPath,omitempty"`
	FilePattern   string   `json:"filePattern,omitempty"`
	LocalStorage  bool     `json:"localStorage"`
	TimeFormat    string   `json:"timeFormat"`
	LogBeginRegex string   `json:"logBeginRegex,omitempty"`
	Regex         string   `json:"regex,omitempty"`
	Key           []string `json:"key,omitempty"`
	FilterKey     []string `json:"filterKey,omitempty"`
	FilterRegex   []string `json:"filterRegex,omitempty"`
	TopicFormat   string   `json:"topicFormat,omitempty"`
}

type LogtailOutput

type LogtailOutput struct {
	LogstoreName string `json:"logstoreName,omitempty"`
}

type Machine

type Machine struct {
	Ip            string `json:"ip,omitempty"`
	Uniqueid      string `json:"machine-uniqueid,omitempty"`
	UserdefinedId string `json:"userdefined-id,omitempty"`
}

type MachineGroup

type MachineGroup struct {
	Name                string          `json:"groupName,omitempty"`
	Type                string          `json:"groupType,omitempty"`
	MachineIdentifyType string          `json:"machineIdentifyType,omitempty"`
	Attribute           *GroupAttribute `json:"attribute,omitempty"`
	MachineList         []string        `json:"machineList,omitempty"`
	CreateTime          uint32          `json:"createTime,omitempty"`
	LastModifyTime      uint32          `json:"lastModifyTime,omitempty"`
}

type MachineGroupList

type MachineGroupList struct {
	Groups []string `json:"machinegroups"`
	Count  int      `json:"count"`
	Total  int      `json:"total"`
}

type MachineList

type MachineList struct {
	Count    int       `json:"count,omitempty"`
	Total    int       `json:"total,omitempty"`
	Machines []Machine `json:"machines,omitempty"`
}

type Project

type Project struct {
	Name        string `json:"projectName,omitempty"`
	Description string `json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*Project) ApplyConfigToMachineGroup

func (proj *Project) ApplyConfigToMachineGroup(machineGroup string, config string) error

func (*Project) CreateConfig

func (proj *Project) CreateConfig(config *LogtailConfig) error

func (*Project) CreateIndex

func (proj *Project) CreateIndex(logstore string, indexConfig *IndexConfig) error

func (*Project) CreateLogstore

func (proj *Project) CreateLogstore(logstore *Logstore) error

func (*Project) CreateMachineGroup

func (proj *Project) CreateMachineGroup(machineGroup *MachineGroup) error

func (*Project) DeleteConfig

func (proj *Project) DeleteConfig(configName string) error

func (*Project) DeleteIndex

func (proj *Project) DeleteIndex(logstore string) error

func (*Project) DeleteLogstore

func (proj *Project) DeleteLogstore(name string) error

func (*Project) DeleteMachineGroup

func (proj *Project) DeleteMachineGroup(name string) error

func (*Project) GetAppliedConfigs

func (proj *Project) GetAppliedConfigs(machineGroup string) ([]string, error)

func (*Project) GetAppliedMachineGroups

func (proj *Project) GetAppliedMachineGroups(configName string) ([]string, error)

func (*Project) GetConfig

func (proj *Project) GetConfig(name string) (*LogtailConfig, error)

func (*Project) GetIndex

func (proj *Project) GetIndex(logstore string) (*IndexConfig, error)

func (*Project) GetLogstore

func (proj *Project) GetLogstore(name string) (*Logstore, error)

func (*Project) ListConfig

func (proj *Project) ListConfig(offset, size int) (*LogtailConfigList, error)

func (*Project) ListLogstore

func (proj *Project) ListLogstore() (*LogstoreList, error)

func (*Project) ListMachineGroup

func (proj *Project) ListMachineGroup(offset, size int) (*MachineGroupList, error)

func (*Project) ListMachines

func (proj *Project) ListMachines(machineGroup string, offset, size int) (*MachineList, error)

func (*Project) ListShards

func (proj *Project) ListShards(logstoreName string) ([]int, error)

func (*Project) MachineGroup

func (proj *Project) MachineGroup(name string) (*MachineGroup, error)

func (*Project) UpdateConfig

func (proj *Project) UpdateConfig(config *LogtailConfig) error

func (*Project) UpdateIndex

func (proj *Project) UpdateIndex(logstore string, indexConfig *IndexConfig) error

func (*Project) UpdateLogstore

func (proj *Project) UpdateLogstore(logstore *Logstore) error

func (*Project) UpdateMachineGroup

func (proj *Project) UpdateMachineGroup(machineGroup *MachineGroup) error

type PutLogsRequest

type PutLogsRequest struct {
	Project  string
	LogStore string
	LogItems LogGroup
	HashKey  string
}

Jump to

Keyboard shortcuts

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