models

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// 一切正常
	ErrNothing = "L200"

	// 单机版 Runner 操作
	ErrConfigName   = "L1001"
	ErrRunnerAdd    = "L1002"
	ErrRunnerDelete = "L1003"
	ErrRunnerStart  = "L1004"
	ErrRunnerStop   = "L1005"
	ErrRunnerReset  = "L1006"
	ErrRunnerUpdate = "L1007"

	// read 相关
	ErrReadRead = "L1101"
	// parse 相关
	ErrParseParse = "L1201"
	// transform 相关
	ErrTransformTransform = "L1301"
	// send 相关
	ErrSendSend = "L1401"

	// 集群版 master API
	ErrClusterSlaves   = "L2001"
	ErrClusterStatus   = "L2002"
	ErrClusterConfigs  = "L2003"
	ErrClusterRegister = "L2004"
	ErrClusterConfig   = "L2014"

	// 集群版 slave API
	ErrClusterTag = "L2005"

	// 集群版 master 对 slaves 的操作
	ErrClusterRunnerAdd    = "L2006"
	ErrClusterRunnerDelete = "L2007"
	ErrClusterRunnerStart  = "L2008"
	ErrClusterRunnerStop   = "L2009"
	ErrClusterRunnerReset  = "L2010"
	ErrClusterRunnerUpdate = "L2011"
	ErrClusterSlavesDelete = "L2012"
	ErrClusterSlavesTag    = "L2013"
)
View Source
const (
	GlobalKeyName = "name"
	KeyCore       = "core"
	KeyHostName   = "hostname"
	KeyOsInfo     = "osinfo"
	KeyLocalIp    = "localip"

	ContentTypeHeader     = "Content-Type"
	ContentEncodingHeader = "Content-Encoding"

	ApplicationJson = "application/json"
	ApplicationGzip = "application/gzip"

	KeyPandoraStash = "pandora_stash" // 当只有一条数据且 sendError 时候,将其转化为 raw 发送到 pandora_stash 这个字段

	SchemaFreeTokensPrefix = "schema_free_tokens_"
	LogDBTokensPrefix      = "logdb_tokens_"
	TsDBTokensPrefix       = "tsdb_tokens_"
	KodoTokensPrefix       = "kodo_tokens_"

	DefaultDirPerm  = 0755
	DefaultFilePerm = 0600
)

Variables

View Source
var ErrorCodeHumanize = map[string]string{
	ErrNothing: "操作成功",

	ErrConfigName:   "获取 Config 出现错误",
	ErrRunnerAdd:    "添加 Runner 出现错误",
	ErrRunnerDelete: "删除 Runner 出现错误",
	ErrRunnerStart:  "开启 Runner 出现错误",
	ErrRunnerStop:   "关闭 Runner 出现错误",
	ErrRunnerReset:  "重置 Runner 出现错误",
	ErrRunnerUpdate: "更新 Runner 出现错误",

	ErrParseParse: "解析字符串失败",

	ErrTransformTransform: "转化字段失败",

	ErrClusterSlaves:   "获取 Slaves 列表出现错误",
	ErrClusterStatus:   "获取 Slaves 状态出现错误",
	ErrClusterConfig:   "获取 Slaves Config 出现错误",
	ErrClusterConfigs:  "获取 Slaves Configs 出现错误",
	ErrClusterRegister: "接受 Slaves 注册出现错误",

	ErrClusterTag: "更改 Tag 出现错误",

	ErrClusterRunnerAdd:    "Slaves 添加 Runner 出现错误",
	ErrClusterRunnerDelete: "Slaves 删除 Runner 出现错误",
	ErrClusterRunnerStart:  "Slaves 启动 Runner 出现错误",
	ErrClusterRunnerStop:   "Slaves 关闭 Runner 出现错误",
	ErrClusterRunnerReset:  "Slaves 重置 Runner 出现错误",
	ErrClusterRunnerUpdate: "Slaves 更新 Runner 出现错误",
	ErrClusterSlavesDelete: "Slaves 从列表中移除时出现错误",
	ErrClusterSlavesTag:    "Slaves 更改 Tag 出现错误",
}

Functions

This section is empty.

Types

type AuthTokens added in v1.4.4

type AuthTokens struct {
	RunnerName   string
	SenderIndex  int
	SenderTokens conf.MapConf
}

type Data

type Data map[string]interface{}

Data store as use key/value map

type KeyValue

type KeyValue struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type LagInfo added in v1.4.4

type LagInfo struct {
	Size     int64  `json:"size"`
	SizeUnit string `json:"sizeunit"`
	Ftlags   int64  `json:"ftlags"`
}

type Option

type Option struct {
	KeyName       string
	ChooseOnly    bool
	ChooseOptions []interface{}
	Default       interface{}
	DefaultNoUse  bool
	Description   string
	CheckRegex    string
	Style         string `json:"style"`
	Required      bool   `json:"required"`
	Placeholder   string `json:"placeholder"`
	Type          string `json:"Type,omitempty"`
	Secret        bool
	Advance       bool   `json:"advance,omitempty"`
	AdvanceDepend string `json:"advance_depend,omitempty"`
}

Jump to

Keyboard shortcuts

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