uncover

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPRequest

func NewHTTPRequest(method, url string, body io.Reader) (*retryablehttp.Request, error)

Types

type Agent

type Agent interface {
	Query(*Session, *Query) (chan Result, error)
	Name() string
}

type AgentOptions

type AgentOptions struct {
	RateLimiter *ratelimit.Limiter
}

type Query

type Query struct {
	Query string
	Limit int
}

type Result

type Result struct {
	Timestamp int64  `json:"timestamp"`
	Source    string `json:"source"`
	IP        string `json:"ip"`
	Port      int    `json:"port"`
	Host      string `json:"host"`
	Raw       []byte `json:"-"`
	Error     error  `json:"-"`
}

func (*Result) HostPort

func (result *Result) HostPort() string

func (*Result) IpPort

func (result *Result) IpPort() string

func (*Result) JSON

func (result *Result) JSON() string

func (*Result) RawData

func (result *Result) RawData() string

type Session

type Session struct {
	Client   *retryablehttp.Client
	RetryMax int
}

func NewSession

func NewSession(retryMax int, timeout time.Duration, proxyFunc func(*http.Request) (*url.URL, error)) (*Session, error)

func (*Session) Do

func (s *Session) Do(request *retryablehttp.Request) (*http.Response, error)

Directories

Path Synopsis
agent

Jump to

Keyboard shortcuts

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