sourceidprovider

package
v0.0.0-...-0ad2128 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllProvider

type AllProvider struct {
	// contains filtered or unexported fields
}

func All

func All(f MetaFetcher) *AllProvider

func (*AllProvider) SourceIDs

func (p *AllProvider) SourceIDs() []string

type Curler

type Curler interface {
	Get(url string) []byte
}

type MetaFetcher

type MetaFetcher interface {
	// Meta returns meta information from LogCache.
	Meta(ctx context.Context) (map[string]*rpc.MetaInfo, error)
}

MetaFetcher returns meta information from LogCache.

type Regex

type Regex struct {
	// contains filtered or unexported fields
}

Regex provides source IDs that are filtered by a regex.

func NewRegex

func NewRegex(isBlacklist bool, pattern string, f MetaFetcher) *Regex

NewRegex compiles the configured regex pattern. If the pattern fails, it will panic.

func (*Regex) SourceIDs

func (r *Regex) SourceIDs() []string

SourceIDs returns each source ID provided by the MetaFetcher that did NOT match the given regex pattern.

type SpaceOption

type SpaceOption func(*SpaceProvider)

func WithSpaceServiceInstances

func WithSpaceServiceInstances() SpaceOption

type SpaceProvider

type SpaceProvider struct {
	// contains filtered or unexported fields
}

func Space

func Space(c Curler, apiURL, spaceGuid string, opts ...SpaceOption) *SpaceProvider

func (*SpaceProvider) SourceIDs

func (s *SpaceProvider) SourceIDs() []string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL