Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Cursor options COPT_TAIL = 1 << 0 COPT_BATCH = 1 << 1 COPT_TAILSTOP = 1 << 2 )
View Source
const ( // Grouping mode RAW = C.VSL_g_raw VXID = C.VSL_g_vxid REQ = C.VSL_g_request SESS = C.VSL_g_session )
View Source
const ( Yes tribool No )
Variables ¶
View Source
var ( ErrAbandoned = errors.New("log abandoned") ErrOverrun = errors.New("log overrun") )
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v1.0.1
type Config struct { // Path to Varnish Shared Memory file Path string // VSM connection timeout in milliseconds // -1 for no timeout Timeout time.Duration // Whether to reacquire the to the log // Values can be Yes or No. Default Yes VslReattach tribool }
Config parameters to connect to a Varnish instance.
type LogCallback ¶
LogCallback defines a callback function. It's used by Log.
type Varnish ¶
type Varnish struct {
// contains filtered or unexported fields
}
A Varnish struct represents a handler for Varnish Shared Memory and Varnish Shared Log.
func (*Varnish) Close ¶
func (v *Varnish) Close()
Close closes and unmaps the Varnish Shared Memory.
func (*Varnish) Log ¶
Log calls the given callback for any transactions matching the query and grouping.
func (*Varnish) Stat ¶
Stat takes a Varnish stat field and returns its value and true if found, 0 and false otherwise.
Click to show internal directories.
Click to hide internal directories.