file

package
v0.0.0-...-47ae3e1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CelVariableContent = "content"
	CelVariableExists  = "exists"
	CelVariableSize    = "size"
	CelVariableAge     = "age"
)
View Source
const Strategy = probe.Strategy("file")

Variables

View Source
var (
	ErrFilePathRequired = errors.New("path config is missing")

	DefaultContentType probe.ContentType = probe.ContentTypePlainText
	DefaultExpect      probe.Expect      = probe.Expect(`exists == true`)
	DefaultFilePath    probe.FilePath    = probe.FilePath("/etc/hosts")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	probe.Schedule `yaml:",inline"`
	Expect         probe.Expect      `yaml:"expect,omitempty"`
	ContentType    probe.ContentType `yaml:"content_type,omitempty"`
	FilePath       probe.FilePath    `yaml:"path,omitempty"`
}

func (*Config) Clone

func (c *Config) Clone() *Config

func (*Config) Prober

func (c *Config) Prober(_ context.Context) (probe.Prober, error)

func (*Config) SetDirectory

func (c *Config) SetDirectory(d string)

func (*Config) Validate

func (c *Config) Validate() error

Jump to

Keyboard shortcuts

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