Documentation ¶
Index ¶
- type RedisConn
- type RedisWriter
- func (RedisWriter) CaddyModule() caddy.ModuleInfo
- func (nw RedisWriter) OpenWriter() (io.WriteCloser, error)
- func (nw *RedisWriter) Provision(ctx caddy.Context) error
- func (nw RedisWriter) String() string
- func (nw *RedisWriter) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
- func (nw RedisWriter) WriterKey() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisConn ¶
redialerConn wraps an underlying Conn so that if any writes fail, the connection is redialed and the write is retried.
type RedisWriter ¶
type RedisWriter struct { // The address of the network socket to which to connect. Address string `json:"address,omitempty"` // The timeout to wait while connecting to the socket. DialTimeout caddy.Duration `json:"dial_timeout,omitempty"` // If enabled, allow connections errors when first opening the // writer. The error and subsequent log entries will be reported // to stderr instead until a connection can be re-established. SoftStart bool `json:"soft_start,omitempty"` // contains filtered or unexported fields }
NetWriter implements a log writer that outputs to a network socket. If the socket goes down, it will dump logs to stderr while it attempts to reconnect.
func (RedisWriter) CaddyModule ¶
func (RedisWriter) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (RedisWriter) OpenWriter ¶
func (nw RedisWriter) OpenWriter() (io.WriteCloser, error)
OpenWriter opens a new network connection.
func (*RedisWriter) Provision ¶
func (nw *RedisWriter) Provision(ctx caddy.Context) error
Provision sets up the module.
func (RedisWriter) String ¶
func (nw RedisWriter) String() string
func (*RedisWriter) UnmarshalCaddyfile ¶
func (nw *RedisWriter) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
UnmarshalCaddyfile sets up the handler from Caddyfile tokens. Syntax:
net <address> { dial_timeout <duration> soft_start }
func (RedisWriter) WriterKey ¶
func (nw RedisWriter) WriterKey() string
WriterKey returns a unique key representing this nw.
Click to show internal directories.
Click to hide internal directories.