Documentation ¶
Index ¶
- Constants
- func GetPaths(fatPaths []FatPath) []string
- type AbsFileMatcher
- type ContainerFileMatcher
- type FatPath
- type FileMatcher
- type FilePathFormatter
- type Format2FileMatcher
- type FormatFileMatcher
- type GlobFileMatcher
- type PodAbsFileMatcher
- type PodRegexpFileMatcher
- type RegexpFileMatcher
- type SlsFileMatch
Constants ¶
View Source
const ( TypePath = "path" TypeGlob = "glob" TypeRegexp = "regexp" TypeFormat = "format" TypeSls = "sls" TypeContainer = "container" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AbsFileMatcher ¶
type AbsFileMatcher struct {
Path string
}
func NewAbsFileMatcher ¶
func NewAbsFileMatcher(path string) *AbsFileMatcher
func (*AbsFileMatcher) IsDynamicMultiFiles ¶
func (m *AbsFileMatcher) IsDynamicMultiFiles() bool
type ContainerFileMatcher ¶
type ContainerFileMatcher struct {
Target *collecttask.CollectTarget
}
func NewContainerFileMatcher ¶
func NewContainerFileMatcher(target *collecttask.CollectTarget) *ContainerFileMatcher
func (*ContainerFileMatcher) IsDynamicMultiFiles ¶
func (c *ContainerFileMatcher) IsDynamicMultiFiles() bool
type FatPath ¶
type FatPath struct { Path string Tags map[string]string IsSls bool SlsConfig logstream.SlsConfig Attrs map[string]string }
富路径 对于绝对路径来说, tags==nil 对于 /home/admin/{a}/{b} 的路径来说 会有2个tags
type FileMatcher ¶
type FileMatcher interface { Find() ([]FatPath, int, error) // 是否动态匹配多文件? IsDynamicMultiFiles() bool }
func NewFormat2FileMatcher ¶
func NewFormat2FileMatcher(basedir string, pattern string) (FileMatcher, error)
type FilePathFormatter ¶
type FilePathFormatter struct {
// contains filtered or unexported fields
}
func (*FilePathFormatter) ContainsFormat ¶
func (f *FilePathFormatter) ContainsFormat(s string) bool
func (*FilePathFormatter) Format ¶
func (f *FilePathFormatter) Format(s string) string
type Format2FileMatcher ¶
type Format2FileMatcher struct {
// contains filtered or unexported fields
}
type FormatFileMatcher ¶
type FormatFileMatcher struct {
// contains filtered or unexported fields
}
func NewFormatFileMatcher ¶
func NewFormatFileMatcher(pattern string) *FormatFileMatcher
func (*FormatFileMatcher) IsDynamicMultiFiles ¶
func (m *FormatFileMatcher) IsDynamicMultiFiles() bool
type GlobFileMatcher ¶
type GlobFileMatcher struct {
// contains filtered or unexported fields
}
func NewGlobFileMatcher ¶
func NewGlobFileMatcher(pattern string) (*GlobFileMatcher, error)
func (*GlobFileMatcher) IsDynamicMultiFiles ¶
func (m *GlobFileMatcher) IsDynamicMultiFiles() bool
type PodAbsFileMatcher ¶
type PodAbsFileMatcher struct { Target *collecttask.CollectTarget Path string }
func NewPodAbsFileMatcher ¶
func NewPodAbsFileMatcher(target *collecttask.CollectTarget, path string) *PodAbsFileMatcher
func (*PodAbsFileMatcher) IsDynamicMultiFiles ¶
func (m *PodAbsFileMatcher) IsDynamicMultiFiles() bool
type PodRegexpFileMatcher ¶
type PodRegexpFileMatcher struct {
// contains filtered or unexported fields
}
func NewPodRegexpFileMatcher ¶
func NewPodRegexpFileMatcher(target *collecttask.CollectTarget, dir, pattern string, maxVisited, maxMatched int) (*PodRegexpFileMatcher, error)
func (*PodRegexpFileMatcher) IsDynamicMultiFiles ¶
func (m *PodRegexpFileMatcher) IsDynamicMultiFiles() bool
type RegexpFileMatcher ¶
type RegexpFileMatcher struct {
// contains filtered or unexported fields
}
func NewRegexpFileMatcher ¶
func NewRegexpFileMatcher(dir, pattern string, maxVisited, maxMatched int) (*RegexpFileMatcher, error)
func (*RegexpFileMatcher) IsDynamicMultiFiles ¶
func (m *RegexpFileMatcher) IsDynamicMultiFiles() bool
type SlsFileMatch ¶
func (*SlsFileMatch) IsDynamicMultiFiles ¶
func (s *SlsFileMatch) IsDynamicMultiFiles() bool
Click to show internal directories.
Click to hide internal directories.