Documentation ¶
Overview ¶
Package meta provides tool for reading metadata from services declaring "MetaProvider" support
Index ¶
- Constants
- type Loader
- type MetaProviderCloser
- type NamespacesProvider
- func (p *NamespacesProvider) Clear()
- func (p *NamespacesProvider) CloseStreamers() error
- func (p *NamespacesProvider) ExcludeIndexes() map[string]struct{}
- func (p *NamespacesProvider) IncludedIndexes() map[string]struct{}
- func (p *NamespacesProvider) InitStreamers(ctx context.Context) error
- func (p *NamespacesProvider) Load()
- func (p *NamespacesProvider) Namespaces() map[string]*idm.UserMetaNamespace
- func (p *NamespacesProvider) ReadNode(node *tree.Node) (*tree.Node, error)
- func (p *NamespacesProvider) Watch()
- type StreamLoader
Constants ¶
const ( ServiceMetaProvider = "MetaProvider" ServiceMetaNsProvider = "MetaNsProvider" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Loader ¶
func NewStreamLoader ¶
type MetaProviderCloser ¶
type MetaProviderCloser func() error
type NamespacesProvider ¶ added in v1.5.0
type NamespacesProvider struct { sync.RWMutex // this handles a lock for the namespaces field // contains filtered or unexported fields }
NamespaceProvider list all namespaces info from services declared ServiceMetaNsProvider It watches events to maintain the list
func NewNamespacesProvider ¶ added in v1.5.0
func NewNamespacesProvider() *NamespacesProvider
NewNamespacesProvider creates a new namespace provider
func (*NamespacesProvider) Clear ¶ added in v1.5.0
func (p *NamespacesProvider) Clear()
Clear unload cached data to force reload at next call
func (*NamespacesProvider) CloseStreamers ¶ added in v1.5.0
func (p *NamespacesProvider) CloseStreamers() error
CloseStreamers closes all prepared streamer clients
func (*NamespacesProvider) ExcludeIndexes ¶ added in v1.5.0
func (p *NamespacesProvider) ExcludeIndexes() map[string]struct{}
ExcludeIndexes lists namespaces that should not be indexed by search engines
func (*NamespacesProvider) IncludedIndexes ¶
func (p *NamespacesProvider) IncludedIndexes() map[string]struct{}
IncludedIndexes lists namespaces that should be indexed by search engines
func (*NamespacesProvider) InitStreamers ¶ added in v1.5.0
func (p *NamespacesProvider) InitStreamers(ctx context.Context) error
InitStreamers prepares a set of NodeProviderStreamerClients ready to be requested
func (*NamespacesProvider) Load ¶ added in v1.5.0
func (p *NamespacesProvider) Load()
Load finds all services declared as ServiceMetaNsProvider and call them to list the namespaces they declare
func (*NamespacesProvider) Namespaces ¶ added in v1.5.0
func (p *NamespacesProvider) Namespaces() map[string]*idm.UserMetaNamespace
Namespaces lists all known usermeta namespaces
func (*NamespacesProvider) ReadNode ¶ added in v1.5.0
ReadNode goes through all prepared streamers to collect metadata
func (*NamespacesProvider) Watch ¶ added in v1.5.0
func (p *NamespacesProvider) Watch()
Watch watches idm ChangeEvents to force reload when metadata namespaces are modified
type StreamLoader ¶
type StreamLoader struct {
// contains filtered or unexported fields
}
func (*StreamLoader) Close ¶
func (l *StreamLoader) Close() error