Documentation ¶
Index ¶
- Constants
- type ControllerClient
- type ControllerHTTPClient
- func (c *ControllerHTTPClient) ExtendEnumCases(tableName, columnName string, enumCases []string) (enumIDs []int, err error)
- func (c *ControllerHTTPClient) FetchAllEnums(tableName string, columnName string) (enumDictReponse []string, err error)
- func (c *ControllerHTTPClient) FetchAllSchemas() (tables []*metaCom.Table, err error)
- func (c *ControllerHTTPClient) FetchSchema(tableName string) (table *metaCom.Table, err error)
- func (c *ControllerHTTPClient) GetAllSchema(namespace string) (tables []metaCom.Table, err error)
- func (c *ControllerHTTPClient) GetAssignment(jobNamespace, instance string) (assignment *models.IngestionAssignment, err error)
- func (c *ControllerHTTPClient) GetAssignmentHash(jobNamespace, instance string) (hash string, err error)
- func (c *ControllerHTTPClient) GetNamespaces() (namespaces []string, err error)
- func (c *ControllerHTTPClient) GetSchemaHash(namespace string) (hash string, err error)
- func (c *ControllerHTTPClient) SetNamespace(namespace string)
Constants ¶
View Source
const (
// InstanceNameHeaderKey is the key for instance name http header
InstanceNameHeaderKey = "AresDB-InstanceName"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControllerClient ¶
type ControllerClient interface { client.SchemaFetcher GetSchemaHash(namespace string) (string, error) GetAllSchema(namespace string) ([]metaCom.Table, error) GetNamespaces() ([]string, error) GetAssignmentHash(jobNamespace, instance string) (string, error) GetAssignment(jobNamespace, instance string) (*models.IngestionAssignment, error) }
ControllerClient defines methods to communicate with ares-controller
type ControllerHTTPClient ¶
type ControllerHTTPClient struct {
// contains filtered or unexported fields
}
ControllerHTTPClient implements ControllerClient over http
func NewControllerHTTPClient ¶
func NewControllerHTTPClient(address string, timeoutSec time.Duration, headers http.Header) *ControllerHTTPClient
NewControllerHTTPClient returns new ControllerHTTPClient
func (*ControllerHTTPClient) ExtendEnumCases ¶
func (c *ControllerHTTPClient) ExtendEnumCases(tableName, columnName string, enumCases []string) (enumIDs []int, err error)
ExtendEnumCases extends enum cases to given table column
func (*ControllerHTTPClient) FetchAllEnums ¶
func (c *ControllerHTTPClient) FetchAllEnums(tableName string, columnName string) (enumDictReponse []string, err error)
FetchAllEnums fetches all enums for given table and column
func (*ControllerHTTPClient) FetchAllSchemas ¶
func (c *ControllerHTTPClient) FetchAllSchemas() (tables []*metaCom.Table, err error)
FetchAllSchemas fetches all schemas
func (*ControllerHTTPClient) FetchSchema ¶
func (c *ControllerHTTPClient) FetchSchema(tableName string) (table *metaCom.Table, err error)
FetchSchema fetch one schema for given table
func (*ControllerHTTPClient) GetAllSchema ¶
func (c *ControllerHTTPClient) GetAllSchema(namespace string) (tables []metaCom.Table, err error)
func (*ControllerHTTPClient) GetAssignment ¶
func (c *ControllerHTTPClient) GetAssignment(jobNamespace, instance string) (assignment *models.IngestionAssignment, err error)
GetAssignment gets the job assignment of the ares-subscriber
func (*ControllerHTTPClient) GetAssignmentHash ¶
func (c *ControllerHTTPClient) GetAssignmentHash(jobNamespace, instance string) (hash string, err error)
GetAssignmentHash get hash code of assignment
func (*ControllerHTTPClient) GetNamespaces ¶
func (c *ControllerHTTPClient) GetNamespaces() (namespaces []string, err error)
func (*ControllerHTTPClient) GetSchemaHash ¶
func (c *ControllerHTTPClient) GetSchemaHash(namespace string) (hash string, err error)
func (*ControllerHTTPClient) SetNamespace ¶
func (c *ControllerHTTPClient) SetNamespace(namespace string)
SetNamespace sets the namespace which the ControllerHTTPClient connects to
Click to show internal directories.
Click to hide internal directories.