Documentation ¶
Index ¶
- Constants
- func CmdTypeToString(cmdType int) string
- func Start(ctx context.Context, cmdType int)
- func Stop(ctx context.Context, cmdType int)
- func WithProfiler(ctx context.Context, profiler CmdProfiler) context.Context
- type CmdProfiler
- type CmdProfilerBuilder
- type NullCmdExecProfilerBuilder
- type NullCmdProfiler
Constants ¶
View Source
const ( CmdTypeSelect = iota CmdTypeCreate CmdTypeDelete CmdTypeRename CmdTypeSubscribe CmdTypeUnsubscribe CmdTypeList CmdTypeLSub CmdTypeStatus CmdTypeAppend CmdTypeCheck CmdTypeClose CmdTypeExpunge CmdTypeSearch CmdTypeFetch CmdTypeStore CmdTypeCopy CmdTypeNoop CmdTypeIdle CmdTypeMove CmdTypeID CmdTypeLogout CmdTypeUnselect CmdTypeLogin CmdTypeExamine CmdTypeUIDMove CmdTypeUIDCopy CmdTypeUIDStore CmdTypeUIDFetch CmdTypeUIDSearch CmdTypeTotal )
Variables ¶
This section is empty.
Functions ¶
func CmdTypeToString ¶
func WithProfiler ¶ added in v0.14.0
func WithProfiler(ctx context.Context, profiler CmdProfiler) context.Context
Types ¶
type CmdProfiler ¶
type CmdProfiler interface { // Start will be called once the command has been received and interpreted. Start(cmdType int) // Stop will be called once the command has finished executing and all the replies sent to the client. Stop(cmdType int) }
CmdProfiler is the interface that can be used to perform measurements related to the execution scope of incoming IMAP commands.
type CmdProfilerBuilder ¶
type CmdProfilerBuilder interface { // New creates a new CmdProfiler instance. New() CmdProfiler // Collect will be called when the IMAP client has disconnected/logged out. Collect(profiler CmdProfiler) }
CmdProfilerBuilder is the interface through which an instance of the CmdProfiler gets created. One of these will be created for each connecting IMAP client.
type NullCmdExecProfilerBuilder ¶
type NullCmdExecProfilerBuilder struct{}
func (*NullCmdExecProfilerBuilder) Collect ¶
func (*NullCmdExecProfilerBuilder) Collect(CmdProfiler)
func (*NullCmdExecProfilerBuilder) New ¶
func (*NullCmdExecProfilerBuilder) New() CmdProfiler
type NullCmdProfiler ¶
type NullCmdProfiler struct{}
NullCmdProfiler represents a null implementation of CmdProfiler.
func (*NullCmdProfiler) Start ¶
func (*NullCmdProfiler) Start(int)
func (*NullCmdProfiler) Stop ¶
func (*NullCmdProfiler) Stop(int)
Click to show internal directories.
Click to hide internal directories.