Documentation
¶
Index ¶
- type GenericReloader
- type GenericReloaderOpts
- type HttpReloader
- func (h HttpReloader) GetMethod() string
- func (h HttpReloader) GetOpts() ReloaderOpts
- func (h HttpReloader) Reload() error
- func (h *HttpReloader) ReloaderRetryPolicy(resp *http.Response, err error) (bool, error)
- func (h HttpReloader) SetCounter(c int) Reloader
- func (h HttpReloader) SetOpts(opts ReloaderOpts) bool
- type HttpReloaderOpts
- type Reloader
- func New(entry string) (Reloader, error)
- func NewGenericReloader(manager string, method string, entry []byte) (Reloader, error)
- func NewGenericReloaderWithCustomError(manager string, method string, err error) (Reloader, error)
- func NewHttpReloader(manager string, method string, entry []byte) (Reloader, error)
- type ReloaderError
- type ReloaderOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenericReloader ¶
type GenericReloader struct {
Opts GenericReloaderOpts
}
func (GenericReloader) GetMethod ¶
func (r GenericReloader) GetMethod() string
func (GenericReloader) GetOpts ¶
func (r GenericReloader) GetOpts() ReloaderOpts
func (GenericReloader) Reload ¶
func (r GenericReloader) Reload() error
func (GenericReloader) SetCounter ¶
func (r GenericReloader) SetCounter(c int) Reloader
func (GenericReloader) SetOpts ¶
func (r GenericReloader) SetOpts(opts ReloaderOpts) bool
type GenericReloaderOpts ¶
type GenericReloaderOpts struct { }
type HttpReloader ¶
type HttpReloader struct { Manager string `json:"-"` Counter int `json:"-"` Method string `mapstructure:"method" json:"method"` Opts HttpReloaderOpts `json:"opts"` }
func (HttpReloader) GetMethod ¶
func (h HttpReloader) GetMethod() string
func (HttpReloader) GetOpts ¶
func (h HttpReloader) GetOpts() ReloaderOpts
func (HttpReloader) Reload ¶
func (h HttpReloader) Reload() error
func (*HttpReloader) ReloaderRetryPolicy ¶
func (HttpReloader) SetCounter ¶
func (h HttpReloader) SetCounter(c int) Reloader
func (HttpReloader) SetOpts ¶
func (h HttpReloader) SetOpts(opts ReloaderOpts) bool
type HttpReloaderOpts ¶
type HttpReloaderOpts struct { Client *retryablehttp.Client `json:"-"` ContentType string `json:"content-type"` Host string `json:"host"` Port string `mapstructure:"port" json:"port"` Uri string `json:"uri"` Method string `json:"method"` Payload string `json:"payload"` Retries string `json:"retries"` RetryWaitMax string `json:"retry-wait-max"` RetryWaitMin string `json:"retry-wait-min"` Timeout string `json:"timeout"` }
func (*HttpReloaderOpts) GetClient ¶
func (h *HttpReloaderOpts) GetClient() *retryablehttp.Client
type Reloader ¶
type Reloader interface { Reload() error GetMethod() string GetOpts() ReloaderOpts SetOpts(ReloaderOpts) bool SetCounter(int) Reloader }
func NewGenericReloader ¶
type ReloaderError ¶
func NewReloaderError ¶
func NewReloaderError() *ReloaderError
func (*ReloaderError) Error ¶
func (r *ReloaderError) Error() string
func (*ReloaderError) WithCode ¶
func (r *ReloaderError) WithCode(c int) *ReloaderError
func (*ReloaderError) WithMessage ¶
func (r *ReloaderError) WithMessage(m string) *ReloaderError
type ReloaderOpts ¶
type ReloaderOpts interface { }
Click to show internal directories.
Click to hide internal directories.