write

package
v0.34.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultArguments = func() Arguments {
		return Arguments{}
	}
)

Functions

func NewFanOut

func NewFanOut(opts component.Options, config Arguments, metrics *metrics) (*fanOutClient, error)

NewFanOut creates a new fan out client that will fan out to all endpoints.

func WithUserAgent

func WithUserAgent(agent string) connect.ClientOption

WithUserAgent returns a `connect.ClientOption` that sets the User-Agent header on.

Types

type Arguments

type Arguments struct {
	ExternalLabels map[string]string  `river:"external_labels,attr,optional"`
	Endpoints      []*EndpointOptions `river:"endpoint,block,optional"`
}

Arguments represents the input state of the pyroscope.write component.

func (*Arguments) UnmarshalRiver

func (rc *Arguments) UnmarshalRiver(f func(interface{}) error) error

UnmarshalRiver implements river.Unmarshaler.

type Component

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

Component is the pyroscope.write component.

func NewComponent

func NewComponent(o component.Options, c Arguments) (*Component, error)

NewComponent creates a new pyroscope.write component.

func (*Component) Run

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

Run implements Component.

func (*Component) Update

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

Update implements Component.

type EndpointOptions

type EndpointOptions struct {
	Name              string                   `river:"name,attr,optional"`
	URL               string                   `river:"url,attr"`
	RemoteTimeout     time.Duration            `river:"remote_timeout,attr,optional"`
	Headers           map[string]string        `river:"headers,attr,optional"`
	HTTPClientConfig  *config.HTTPClientConfig `river:",squash"`
	MinBackoff        time.Duration            `river:"min_backoff_period,attr,optional"`  // start backoff at this level
	MaxBackoff        time.Duration            `river:"max_backoff_period,attr,optional"`  // increase exponentially to this level
	MaxBackoffRetries int                      `river:"max_backoff_retries,attr,optional"` // give up after this many; zero means infinite retries
}

EndpointOptions describes an individual location for where profiles should be delivered to using the Pyroscope push API.

func GetDefaultEndpointOptions

func GetDefaultEndpointOptions() EndpointOptions

func (*EndpointOptions) UnmarshalRiver

func (r *EndpointOptions) UnmarshalRiver(f func(v interface{}) error) error

UnmarshalRiver implements river.Unmarshaler.

type Exports

type Exports struct {
	Receiver pyroscope.Appendable `river:"receiver,attr"`
}

Exports are the set of fields exposed by the pyroscope.write component.

Jump to

Keyboard shortcuts

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