catalog

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigSectionKey = "catalog-cache"

Variables

This section is empty.

Functions

func GetDefaultGrpcOptions

func GetDefaultGrpcOptions() []grpc_retry.CallOption

func TransformFromParameters

func TransformFromParameters(m []*datacatalog.Parameter) (*core.LiteralMap, error)

func TransformToInputParameters

func TransformToInputParameters(ctx context.Context, m *core.LiteralMap) ([]*datacatalog.Parameter, error)

Hash each value in the map and return it as the parameter value to be used to generate the Provenance.

func TransformToOutputParameters

func TransformToOutputParameters(ctx context.Context, m *core.LiteralMap) ([]*datacatalog.Parameter, error)

Types

type Client

type Client interface {
	Get(ctx context.Context, task *core.TaskTemplate, inputPath storage.DataReference) (*core.LiteralMap, error)
	Put(ctx context.Context, task *core.TaskTemplate, execID *core.TaskExecutionIdentifier, inputPath storage.DataReference, outputPath storage.DataReference) error
}

func NewCatalogClient

func NewCatalogClient(ctx context.Context, store storage.ProtobufStore) (Client, error)

type Config

type Config struct {
	Type     DiscoveryType `json:"type" pflag:"\"noop\", Catalog Implementation to use"`
	Endpoint string        `json:"endpoint" pflag:"\"\", Endpoint for catalog service"`
	Insecure bool          `json:"insecure" pflag:"false, Use insecure grpc connection"`
}

func GetConfig

func GetConfig() *Config

Gets loaded config for Discovery

func (Config) GetPFlagSet

func (Config) GetPFlagSet(prefix string) *pflag.FlagSet

GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the flags is json-name.json-sub-name... etc.

type DiscoveryType

type DiscoveryType = string
const (
	NoOpDiscoveryType   DiscoveryType = "noop"
	LegacyDiscoveryType DiscoveryType = "legacy"
	DataCatalogType     DiscoveryType = "datacatalog"
)

type LegacyDiscovery

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

LegacyDiscovery encapsulates interactions with the Discovery service using a protobuf provided gRPC client.

func NewLegacyDiscovery

func NewLegacyDiscovery(discoveryEndpoint string, store storage.ProtobufStore) *LegacyDiscovery

func (*LegacyDiscovery) Get

func (*LegacyDiscovery) Put

type MockCatalogClient

type MockCatalogClient struct {
	GetFunc func(ctx context.Context, task *core.TaskTemplate, inputPath storage.DataReference) (*core.LiteralMap, error)
	PutFunc func(ctx context.Context, task *core.TaskTemplate, execID *core.TaskExecutionIdentifier, inputPath storage.DataReference, outputPath storage.DataReference) error
}

func (*MockCatalogClient) Get

func (*MockCatalogClient) Put

type NoOpDiscovery

type NoOpDiscovery struct{}

NoOpDiscovery

func NewNoOpDiscovery

func NewNoOpDiscovery() *NoOpDiscovery

func (*NoOpDiscovery) Get

func (*NoOpDiscovery) Put

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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