Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithClient ¶
WithClient defines the client that should be used for sending metrics to the errcat server. This allows finer control over the client than WithServerAddr.
func WithEnvironment ¶
func WithEnvironment(env string) optionD
WithEnvironment defines the environment the daemon should indicate the calls are being made in.
func WithServerAddr ¶
WithServerAddr will create a client for communicating to the errcat server using the supplied server address.
func WithService ¶
func WithService(service string) optionD
WithService defines the service the daemon should indicate the calls are initiated from.
Types ¶
type Caller ¶
type Caller struct {
// contains filtered or unexported fields
}
func (Caller) WithBreaker ¶
WithBreaker attaches a circuit breaker to the caller.
func (Caller) WithFallback ¶
WithFallback defines the fallback behavior for the caller.
func (Caller) WithRetrier ¶
WithRetrier indicates the caller should be retried in the event of a failure.
func (Caller) WithTimeout ¶
WithTimeout enforces a timeout on the caller. This method should only be used in those cases where the wrapped dependency does not already provide timeout functionality. This is because this method does not stop the callback from running if it exceeds the timeout; it only ensures that the Call returns in the allotted time, whereas the dependency functionality may provide better cleanup.
type Daemon ¶
type Daemon struct {
// contains filtered or unexported fields
}
Daemon is the background processor that will collect all calls and send them to the errcat server.
func (*Daemon) RegisterCaller ¶
RegisterCaller attaches a caller to the daemon so that it does not need to be re-instantiated.