Documentation
¶
Overview ¶
Package global provides types and methods to parse global options for PIP CLI.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Input holds path to file with requests.
Input string
// N is a number of requests to send.
N int
// Network stores kind of destination network.
Network string
// Address represents destination address.
Address string
// Servers is an array of servers used to initialize balancer.
Servers StringSet
// RoundRobinBalancer turns on round-robin balancer.
RoundRobinBalancer bool
// HotSpotBalancer turns on hot-spot balancer.
HotSpotBalancer bool
// DNSRadar turns on discovery by default DNS resolver.
DNSRadar bool
// K8sRadar turns on discovery by in-cluster kubernetes tools.
K8sRadar bool
// MaxRequestSize limits request size in bytes.
MaxRequestSize int
// MaxQueue limits number of requests client can send in parallel.
MaxQueue int
// BufferSize defines size of input and output buffers.
BufferSize int
// ConnTimeout sets connection timeout.
ConnTimeout time.Duration
// WriteInterval is duration after which data from write buffer are sent to
// network even if write buffer isn't full.
WriteInterval time.Duration
// ResponseTimeout sets response timeout.
ResponseTimeout time.Duration
// ResponseCheckInterval is an inteval of response timeout checks.
ResponseCheckInterval time.Duration
// Requests holds a list of information requests.
Requests []Request
// Client is PIP client interface.
Client client.Client
}
Config holds all global options for PIP CLI.
func NewConfigFromCommandLine ¶
func NewConfigFromCommandLine(usage func()) *Config
NewConfigFromCommandLine parses command line arguments and fills Config accordingly.
func (*Config) LoadRequests ¶
LoadRequests get a list of requests from YAML file.
type Request ¶
type Request struct {
// Path identifies information endpoint within single PIP instance.
Path string
// Args is a list of arguments.
Args []pdp.AttributeValue
}
Request represent single information request to PIP.
Click to show internal directories.
Click to hide internal directories.