factory

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 22 Imported by: 6

Documentation

Index

Constants

View Source
const (
	ComponentId       = 6041
	ImplementedByBase = "base"
	ImplementedByGrpc = "grpc"
	ImplementedByMock = "mock"
)

Identfier of the factory package found messages having the format "senzing-6041xxxx".

Variables

View Source
var IdMessages = map[int]string{
	1:    "Enter AddDataSource(%v, %s).",
	2:    "Exit  AddDataSource(%v, %s) returned (%s, %v).",
	4001: "Cannot G2Config.Init()",
	4002: "Cannot G2Configmgr.Init()",
	4003: "Cannot G2Diagnostic.Init()",
	4004: "Cannot G2Engine.Init()",
	4005: "Cannot G2Product.Init()",
	4010: "Did not make a gRPC connection",
}

Message templates for the factory package.

View Source
var IdStatuses = map[int]string{}

Status strings for specific factory messages.

Functions

This section is empty.

Types

type SdkAbstractFactory

type SdkAbstractFactory interface {
	GetG2config(ctx context.Context) (g2api.G2config, error)
	GetG2configmgr(ctx context.Context) (g2api.G2configmgr, error)
	GetG2diagnostic(ctx context.Context) (g2api.G2diagnostic, error)
	GetG2engine(ctx context.Context) (g2api.G2engine, error)
	GetG2product(ctx context.Context) (g2api.G2product, error)
}

The SdkAbstractFactory interface shows what Senzing objects that can be retrieved from the abstract factory.

type SdkAbstractFactoryImpl

type SdkAbstractFactoryImpl struct {
	GrpcDialOptions []grpc.DialOption
	GrpcTarget      string

	ObserverOrigin string
	Observers      []observer.Observer
	// contains filtered or unexported fields
}

SdkAbstractFactoryImpl is the default implementation of the SdkAbstractFactory interface.

func (*SdkAbstractFactoryImpl) GetG2config

func (factory *SdkAbstractFactoryImpl) GetG2config(ctx context.Context) (g2api.G2config, error)

The GetG2config method returns a G2config object based on the information passed in the SdkAbstractFactoryImpl structure. If GrpcTarget is spectified, an implementation that communicates over gRPC will be returned. If GrpcTarget is empty, an implementation that uses a local Senzing Go SDK will be returned.

Input

  • ctx: A context to control lifecycle.

Output

  • An initialized G2config object. See the example output.

func (*SdkAbstractFactoryImpl) GetG2configmgr

func (factory *SdkAbstractFactoryImpl) GetG2configmgr(ctx context.Context) (g2api.G2configmgr, error)

The GetG2configmgr method returns a G2configmgr object based on the information passed in the SdkAbstractFactoryImpl structure. If GrpcTarget is spectified, an implementation that communicates over gRPC will be returned. If GrpcTarget is empty, an implementation that uses a local Senzing Go SDK will be returned.

Input

  • ctx: A context to control lifecycle.

Output

  • An initialized G2configmgr object. See the example output.

func (*SdkAbstractFactoryImpl) GetG2diagnostic

func (factory *SdkAbstractFactoryImpl) GetG2diagnostic(ctx context.Context) (g2api.G2diagnostic, error)

The GetG2diagnostic method returns a G2diagnostic object based on the information passed in the SdkAbstractFactoryImpl structure. If GrpcTarget is spectified, an implementation that communicates over gRPC will be returned. If GrpcTarget is empty, an implementation that uses a local Senzing Go SDK will be returned.

Input

  • ctx: A context to control lifecycle.

Output

  • An initialized G2diagnostic object. See the example output.

func (*SdkAbstractFactoryImpl) GetG2engine

func (factory *SdkAbstractFactoryImpl) GetG2engine(ctx context.Context) (g2api.G2engine, error)

The GetG2engine method returns a G2engine object based on the information passed in the SdkAbstractFactoryImpl structure. If GrpcTarget is spectified, an implementation that communicates over gRPC will be returned. If GrpcTarget is empty, an implementation that uses a local Senzing Go SDK will be returned.

Input

  • ctx: A context to control lifecycle.

Output

  • An initialized G2engine object. See the example output.

func (*SdkAbstractFactoryImpl) GetG2product

func (factory *SdkAbstractFactoryImpl) GetG2product(ctx context.Context) (g2api.G2product, error)

The GetG2product method returns a G2product object based on the information passed in the SdkAbstractFactoryImpl structure. If GrpcTarget is spectified, an implementation that communicates over gRPC will be returned. If GrpcTarget is empty, an implementation that uses a local Senzing Go SDK will be returned.

Input

  • ctx: A context to control lifecycle.

Output

  • An initialized G2product object. See the example output.

Jump to

Keyboard shortcuts

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