collector

package
v0.0.0-...-dea5896 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Alive atomic.Bool
)

Functions

func BaseURL

func BaseURL(s string) (*url.URL, error)

func ComplianceURL

func ComplianceURL(s string) (*url.URL, error)

func FeedURL

func FeedURL(s string) (*url.URL, error)

func InitURL

func InitURL(s string) (*url.URL, error)

func LogSimpleResponse

func LogSimpleResponse(response *jsonrpc.RPCResponse, log *plog.Logger)

func NewRequester

func NewRequester(dbOpensvc string, auth string, insecure bool) (*httphelper.T, error)

func RestURL

func RestURL(s string) (*url.URL, error)

Types

type Client

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

Client exposes the jsonrpc2 Call function wrapped to add the auth arg

func NewComplianceClient

func NewComplianceClient(endpoint, secret string) (*Client, error)

NewComplianceClient returns a Client to call the collector init app jsonrpc2 methods.

func NewFeedClient

func NewFeedClient(endpoint, secret string) (*Client, error)

NewFeedClient returns a Client to call the collector feed app jsonrpc2 methods.

func NewInitClient

func NewInitClient(endpoint, secret string) (*Client, error)

NewInitClient returns a Client to call the collector init app jsonrpc2 methods.

func (*Client) Call

func (c *Client) Call(method string, params ...interface{}) (*jsonrpc.RPCResponse, error)

Call executes a jsonrpc2 collector call and returns the response.

func (*Client) CallFor

func (c *Client) CallFor(out interface{}, method string, params ...interface{}) error

func (*Client) NewPinger

func (c *Client) NewPinger() *Pinger

func (*Client) Ping

func (c *Client) Ping() bool

func (*Client) SetLogger

func (c *Client) SetLogger(log *plog.Logger)

func (*Client) String

func (c *Client) String() string

type Pinger

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

func (*Pinger) Start

func (t *Pinger) Start(ctx context.Context, interval time.Duration)

func (*Pinger) Stop

func (t *Pinger) Stop()

type TagAttachment

type TagAttachment struct {
	TagName       string `json:"tag_name"`
	TagData       string `json:"tag_data"`
	TagAttachData string `json:"tag_attach_data"`
}

type TagAttachmentList

type TagAttachmentList []TagAttachment

func (TagAttachmentList) Render

func (t TagAttachmentList) Render() string

Jump to

Keyboard shortcuts

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