cloudflare

package
v0.39.2 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultArguments = Arguments{
	Workers:    3,
	PullRange:  1 * time.Minute,
	FieldsType: string(cft.FieldsTypeDefault),
}

DefaultArguments sets the configuration defaults.

Functions

This section is empty.

Types

type Arguments

type Arguments struct {
	APIToken         rivertypes.Secret   `river:"api_token,attr"`
	ZoneID           string              `river:"zone_id,attr"`
	Labels           map[string]string   `river:"labels,attr,optional"`
	Workers          int                 `river:"workers,attr,optional"`
	PullRange        time.Duration       `river:"pull_range,attr,optional"`
	FieldsType       string              `river:"fields_type,attr,optional"`
	AdditionalFields []string            `river:"additional_fields,attr,optional"`
	ForwardTo        []loki.LogsReceiver `river:"forward_to,attr"`
}

Arguments holds values which are used to configure the loki.source.cloudflare component.

func (Arguments) Convert

func (c Arguments) Convert() *cft.Config

Convert returns a cloudflaretarget Config struct from the Arguments.

func (*Arguments) SetToDefault added in v0.35.0

func (c *Arguments) SetToDefault()

SetToDefault implements river.Defaulter.

func (*Arguments) Validate added in v0.35.0

func (c *Arguments) Validate() error

Validate implements river.Validator.

type Component

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

Component implements the loki.source.cloudflare component.

func New

func New(o component.Options, args Arguments) (*Component, error)

New creates a new loki.source.cloudflare component.

func (*Component) DebugInfo

func (c *Component) DebugInfo() interface{}

DebugInfo returns information about the status of targets.

func (*Component) Run

func (c *Component) Run(ctx context.Context) error

Run implements component.Component.

func (*Component) Update

func (c *Component) Update(args component.Arguments) error

Update implements component.Component.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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