Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudflareConfig ¶
type CloudflareConfig struct {
sync.RWMutex
Token string `toml:"api_token"`
BaseURL string `toml:"base_url"`
RatelimitConfiguration RatelimitConfiguration `toml:"ratelimit"`
// contains filtered or unexported fields
}
func (*CloudflareConfig) CreateClient ¶
func (c *CloudflareConfig) CreateClient() (*cloudflare.API, error)
func (*CloudflareConfig) GetClient ¶
func (c *CloudflareConfig) GetClient() (cloudflare.API, error)
Initialize Metrics + Tracing for the app. NOTE: you must call defer t.Stop() to propely cleanup
func (*CloudflareConfig) Merge ¶
func (c *CloudflareConfig) Merge(other *CloudflareConfig) error
func (*CloudflareConfig) RegisterFlags ¶
func (c *CloudflareConfig) RegisterFlags(f *flag.FlagSet)
func (*CloudflareConfig) Validate ¶
func (c *CloudflareConfig) Validate() error
type RatelimitConfiguration ¶
type RatelimitConfiguration struct {
RequestsPerSecond float64 `toml:"requests_per_second"`
RetryPolicy *RetryPolicy `toml:"retry_policy"`
}
type RetryPolicy ¶
Click to show internal directories.
Click to hide internal directories.