Documentation
¶
Overview ¶
Package http implements the remote.http component.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultArguments = Arguments{
PollFrequency: 1 * time.Minute,
PollTimeout: 10 * time.Second,
Client: common_config.DefaultHTTPClientConfig,
Method: http.MethodGet,
}
DefaultArguments holds default settings for Arguments.
Functions ¶
This section is empty.
Types ¶
type Arguments ¶
type Arguments struct {
URL string `river:"url,attr"`
PollFrequency time.Duration `river:"poll_frequency,attr,optional"`
PollTimeout time.Duration `river:"poll_timeout,attr,optional"`
IsSecret bool `river:"is_secret,attr,optional"`
Method string `river:"method,attr,optional"`
Headers map[string]string `river:"headers,attr,optional"`
Client common_config.HTTPClientConfig `river:"client,block,optional"`
}
Arguments control the remote.http component.
func (*Arguments) UnmarshalRiver ¶
func (args *Arguments) UnmarshalRiver(f func(interface{}) error) error
UnmarshalRiver implements river.Unmarshaler.
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
Component implements the remote.http component.
func New ¶
func New(opts component.Options, args Arguments) (*Component, error)
New returns a new, unstarted, remote.http component.
func (*Component) CurrentHealth ¶
func (c *Component) CurrentHealth() component.Health
CurrentHealth returns the current health of the component.
Click to show internal directories.
Click to hide internal directories.