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.
Click to show internal directories.
Click to hide internal directories.