Documentation
¶
Index ¶
Constants ¶
const ( NotificationUndefined Notification = 0 // undefined-notification NotificationBegin = 1 << (iota - 1) // begin-notification NotificationEnd // end-notification NotificationDescend // descend-notification NotificationAscend // ascend-notification NotificationWake // wake-notification NotificationSleep // sleep-notification NotificationAll = math.MaxUint32 // all-notification )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilterScope ¶
type FilterScope uint32
FilterScope allows client to define which node types should be filtered. Filters can be applied to multiple node types by bitwise or-ing the XXXNodes definitions. A node may have multiple scope designations, eg a node may be top level and leaf if the top level directory does not itself contain further sub-directories thereby making it also a leaf. It should be noted a file is only a leaf node all of its siblings are all files only
const ( ScopeUndefined FilterScope = 0 // undefined-scope // ScopeTree, the Tree scope // ScopeTree FilterScope = 1 << (iota - 1) // tree-scope // ScopeTop, any node that is a direct descendent of the tree node // ScopeTop // top-scope // ScopeLeaf, for directories, any node that has no sub directories. For // files, any node that appears under a leaf directory node // ScopeLeaf // leaf-scope // ScopeIntermediate, apply filter to nodes which are neither leaf or top nodes // ScopeIntermediate // intermediate-scope // ScopeFile attributed to file nodes // ScopeFile // file-scope // ScopeDirectory attributed to directory nodes // ScopeDirectory // directory-scope // ScopeCustom, client defined categorisation (yet to be confirmed) // ScopeCustom // custom-scope // ScopeAll represents any node type // ScopeAll = math.MaxUint32 // all-scopes )
func (*FilterScope) Clear ¶
func (f *FilterScope) Clear(mask FilterScope)
Clear clears the bit position indicated by mask
func (*FilterScope) IsDirectory ¶
func (f *FilterScope) IsDirectory() bool
IsDirectory check is the directory bit is set
func (*FilterScope) IsFile ¶
func (f *FilterScope) IsFile() bool
IsFile check is the file bit is set
func (*FilterScope) IsTree ¶
func (f *FilterScope) IsTree() bool
IsTree check is the tree bit is set
func (*FilterScope) Scrub ¶
func (f *FilterScope) Scrub() FilterScope
Scrub ensures only file/directory scopes are set
func (*FilterScope) Set ¶
func (f *FilterScope) Set(mask FilterScope)
Set sets the bit position indicated by mask
func (FilterScope) String ¶
func (i FilterScope) String() string
type FilterType ¶
type FilterType uint
const ( FilterTypeUndefined FilterType = iota // undefined-filter // FilterTypeGlobEx is the preferred filter type as it the most // user friendly. The base part of the name is filtered by a glob // and the suffix is filtered by a list of defined extensions. The pattern // for the extended filter type is composed of 2 parts; the first is a // glob, which is applied to the base part of the name. The second part // is a csv of required extensions to filter for. The pattern is specified // in the form: "<base-glob>|ext1,ext2...". Each extension may include a // a leading dot. An example pattern definition would be: // "cover.*|.jpg,jpeg" // FilterTypeGlobEx // glob-ex-filter // FilterTypeRegex regex filter // FilterTypeRegex // regex-filter // FilterTypeGlob glob filter // FilterTypeGlob // glob-filter // FilterTypeCustom client definable filter // FilterTypeCustom // custom-filter // FilterTypePoly poly filter // FilterTypePoly // poly-filter )
func (FilterType) String ¶
func (i FilterType) String() string
type Hibernation ¶
type Hibernation uint
Hibernation denotes whether user defined callback is being invoked.
const ( HibernationUndefined Hibernation = iota // undefined // HibernationPending conditional listening is awaiting activation // HibernationPending // pending-hibernation // HibernationActive conditional listening is active (callback is invoked) // HibernationActive // active-hibernation // HibernationRetired conditional listening is now deactivated // HibernationRetired // retired-hibernation )
func (Hibernation) String ¶
func (i Hibernation) String() string
type InternalRole ¶
type InternalRole uint
InternalRole represents the role of an application entity (like a plugin role) The key element of a role is that there should be just a single entity that can take up the role which is bound to a service.
For example, there can only be 1 logger. which means there can only be 1 entity that claims to provide this service, typically when the client invoke WithLogger option. This is similar to plugin architectures that allows plugins to register to provide a particular service.
The mediator knows about Roles and manage registration requests
const ( InternalRoleRoleUndefined InternalRole = iota // undefined-role InternalRoleLogger // logger-role InternalRoleSampler // sampler-role InternalRoleResume // resume-role )
func (InternalRole) String ¶
func (i InternalRole) String() string
type Metric ¶
type Metric uint
const ( // MetricNoFilesInvoked represents the no of files invoked for during traversal // MetricNoFilesInvoked Metric // metric-no-of-files // MetricNoFilesFilteredOut represents the no of files filtered out // MetricNoFilesFilteredOut // metric-no-of-files-filtered-out // MetricNoDirectoriesInvoked represents the no of directories invoked for during traversal // MetricNoDirectoriesInvoked // metric-no-of-directories // MetricNoDirectoriesFilteredOut represents the no of directories filtered out // MetricNoDirectoriesFilteredOut // metric-no-of-directories-filtered-out // MetricNoChildFilesFound represents the number of children files // of a particular directory that pass the compound filter when using the directories // with files subscription // MetricNoChildFilesFound // metric-no-of-child-files-found // MetricNoChildFilesFilteredOut represents the number of children files // of a particular directory that fail to pass the compound filter when using // the directories with files subscription // MetricNoChildFilesFilteredOut // metric-no-of-child-files-found )
if new metrics are added, ensure that navigationMetricsFactory.new is kept in sync.
type Notification ¶
type Notification uint32
func (Notification) String ¶
func (i Notification) String() string
type PersistenceFormat ¶
type PersistenceFormat uint
const ( PersistUndefined PersistenceFormat = iota // persistence-undefined PersistJSON // persist-json )
func (PersistenceFormat) String ¶
func (i PersistenceFormat) String() string
type ResumeStrategy ¶
type ResumeStrategy uint
const ( ResumeStrategyUndefined ResumeStrategy = iota // undefined-resume-strategy ResumeStrategySpawn // spawn-resume-strategy ResumeStrategyFastward // fastward-resume-strategy )
func (ResumeStrategy) String ¶
func (i ResumeStrategy) String() string
type SampleType ¶
type SampleType uint
SampleType determines the type of sampling to use
const ( SampleTypeUndefined SampleType = iota // undefined-sample SampleTypeSlice // slice-sample SampleTypeFilter // filter-sample SampleTypeCustom // custom-sample )
func (SampleType) String ¶
func (i SampleType) String() string
type SkipTraversal ¶
type SkipTraversal uint
const ( SkipNoneTraversal SkipTraversal = iota // skip-none SkipDirTraversal // skip-dir SkipAllTraversal // skip-all )
func (SkipTraversal) String ¶
func (i SkipTraversal) String() string
type Subscription ¶
type Subscription uint
Subscription type to define traversal subscription (for which file system items the client defined callback are invoked for).
const ( SubscribeUndefined Subscription = iota SubscribeFiles // subscribe-files SubscribeDirectories // subscribe-directories SubscribeDirectoriesWithFiles // subscribe-directories-with-files SubscribeUniversal // subscribe-to-everything )
func (Subscription) String ¶
func (i Subscription) String() string
type TriStateBool ¶
type TriStateBool uint
const ( TriStateBoolUndefined TriStateBool = iota // undefined-bool TriStateBoolTrue // true TriStateBoolFalse // false )
func (TriStateBool) String ¶
func (i TriStateBool) String() string
Source Files
¶
- entry-type-en-auto.go
- entry-type-en.go
- filter-scope-en-auto.go
- filter-scope-en.go
- filter-type-en-auto.go
- filter-type-en.go
- hibernation-en-auto.go
- hibernation-en.go
- internal-role-en-auto.go
- internal-role-en.go
- metric-en-auto.go
- metric-en.go
- notification-en-auto.go
- notification-en.go
- persistence-format-en-auto.go
- persistence-format-en.go
- resume-strategy-en-auto.go
- resume-strategy-en.go
- role-en-auto.go
- role-en.go
- sample-type-en-auto.go
- sample-type-en.go
- skip-traversal-en-auto.go
- skip-traversal-en.go
- subscription-en-auto.go
- subscription-en.go
- tri-state-bool-en-auto.go
- tri-state-bool-en.go
- way-point-en-auto.go
- way-point-en.go