server

package
v0.0.0-...-4624acb Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetastoreCreator

type MetastoreCreator interface {
	CreateClientConnForBusiness(
		ctx context.Context, params metaModel.StoreConfig,
	) (metaModel.ClientConn, error)

	CreateClientConnForFramework(
		ctx context.Context, params metaModel.StoreConfig,
	) (metaModel.ClientConn, error)
}

MetastoreCreator abstracts creation behavior of the various metastore clients.

type MetastoreManager

type MetastoreManager interface {
	// Init fetches metastore configurations from Servermaster and
	// creates the necessary client.
	// Init is made part of the interface because the interface is intended
	// to reflect the dependency between the objects during server initialization.
	// NOTE: Init must be called before other methods can be.
	Init(ctx context.Context, discoveryClient client.DiscoveryClient) error
	IsInitialized() bool
	Close()

	FrameworkClientConn() metaModel.ClientConn
	BusinessClientConn() metaModel.ClientConn
}

MetastoreManager maintains all metastore clients we need. Except for FrameworkStore and BusinessClientConn, a MetastoreManager is not thread-safe.

TODO refactor some code repetition together with servermaster.MetaStoreManager, and add integration tests between MetastoreManager in this file and servermaster.MetaStoreManager.

func NewMetastoreManager

func NewMetastoreManager() MetastoreManager

NewMetastoreManager returns a new MetastoreManager. Note that Init() should be called first before using it.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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