Documentation ¶
Overview ¶
Package ops wraps github.com/getlantern/ops with convenience methods for flashlight
Index ¶
- func Go(fn func())
- func RegisterReporter(reporter ops.Reporter)
- func SetGlobal(key string, value interface{})
- func SetGlobalDynamic(key string, valueFN func() interface{})
- type Op
- func (op *Op) Begin(name string) *Op
- func (op *Op) ChainedProxy(addr string, protocol string) *Op
- func (op *Op) End()
- func (op *Op) FailIf(err error) error
- func (op *Op) Go(fn func())
- func (op *Op) Origin(v string) *Op
- func (op *Op) ProxyAddr(v string) *Op
- func (op *Op) ProxyProtocol(v string) *Op
- func (op *Op) ProxyType(v ProxyType) *Op
- func (op *Op) Request(r *http.Request) *Op
- func (op *Op) Response(r *http.Response) *Op
- func (op *Op) Set(key string, value interface{}) *Op
- func (op *Op) SetDynamic(key string, valueFN func() interface{}) *Op
- func (op *Op) UserAgent(v string) *Op
- type ProxyType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterReporter ¶
RegisterReporter mimics the similar method from ops
func SetGlobal ¶
func SetGlobal(key string, value interface{})
SetGlobal mimics the similar method from ops
func SetGlobalDynamic ¶
func SetGlobalDynamic(key string, valueFN func() interface{})
SetGlobalDynamic mimics the similar method from ops
Types ¶
type Op ¶
type Op struct {
// contains filtered or unexported fields
}
Op decorates an ops.Op with convenience methods.
func (*Op) ChainedProxy ¶
ChainedProxy attaches chained proxy information to the Context
func (*Op) ProxyProtocol ¶
ProxyProtocol attaches proxy server's protocol to the Context
func (*Op) Response ¶
Response attaches key information of an `http.Response` to the Context. If the response has corresponding Request it will call Request internally.
func (*Op) SetDynamic ¶
SetDynamic mimics the similar method from ops.Op
Click to show internal directories.
Click to hide internal directories.