Version: v3.3.3+incompatible Latest Latest

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 11 Imported by: 4




This section is empty.


This section is empty.


func CreateEtcdClient

func CreateEtcdClient(configFile string) (*etcd.BytesConnectionEtcd, error)

CreateEtcdClient uses environment variable ETCD_CONFIG or ETCD config file to establish connection


type HTTPClient

type HTTPClient struct {
	// Config for this client
	Config *HTTPClientConfig
	// contains filtered or unexported fields

HTTPClient wraps http.Client with configured authorization and url base

func CreateHTTPClient

func CreateHTTPClient(configFile string) (*HTTPClient, error)

CreateHTTPClient uses environment variable HTTP_CONFIG or HTTP config file to establish connection

func (*HTTPClient) Crawl

func (client *HTTPClient) Crawl(base string, cmd string, suffix string) []string

Crawl extracts all http** links from a given webpage (suffix default is

func (*HTTPClient) Get

func (client *HTTPClient) Get(base string, cmd string) (*http.Response, error)

Get creates http get request prefixing cmd with base if needed and using correct authentication

func (*HTTPClient) Post

func (client *HTTPClient) Post(base string, cmd string, body string) (*http.Response, error)

Post creates http post request prefixing cmd with base if needed and using correct authentication

type HTTPClientConfig

type HTTPClientConfig struct {
	// Port on what targets are listening on
	Port string `json:"port"`
	// Basic authorization for client
	BasicAuth string `json:"basic-auth"`
	// If https or http should be used
	UseHTTPS bool `json:"use-https"`
	// Defines whether server cert should be verified.
	// Set to false in case of self-signed certificates.
	VerifyServerCert bool `json:"verify-server-cert"`

HTTPClientConfig is configuration for http client

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL