Documentation
¶
Index ¶
Constants ¶
View Source
const (
// DefaultExecutiveURL is where the executive can be reached
DefaultExecutiveURL = "ctlstore-executive.segment.local"
)
Variables ¶
View Source
var ( ErrCookieConflict = errors.New("Cookie conflict") ErrWriterNotFound = errors.New("Writer not found") ErrWriterAlreadyExists = errors.New("Writer already exists with different credentials") ErrCookieTooLong = fmt.Errorf("Maximum cookie length is %d bytes", limits.LimitWriterCookieSize) )
View Source
var ErrTableDoesNotExist = errors.New("table does not exist")
Functions ¶
This section is empty.
Types ¶
type ExecutiveEndpoint ¶
type ExecutiveEndpoint struct {
HealthChecker HealthChecker
Exec ExecutiveInterface
EnableDestructiveSchemaChanges bool
}
ExecutiveEndpoint is an HTTP 'wrapper' for ExecutiveInterface
func (*ExecutiveEndpoint) Close ¶
func (ee *ExecutiveEndpoint) Close() error
func (*ExecutiveEndpoint) Handler ¶
func (ee *ExecutiveEndpoint) Handler() http.Handler
type ExecutiveInterface ¶
type ExecutiveInterface interface {
CreateFamily(familyName string) error
CreateTable(familyName string, tableName string, fieldNames []string, fieldTypes []schema.FieldType, keyFields []string) error
CreateTables([]schema.Table) error
AddFields(familyName string, tableName string, fieldNames []string, fieldTypes []schema.FieldType) error
Mutate(writerName string, writerSecret string, familyName string, cookie []byte, checkCookie []byte, requests []ExecutiveMutationRequest) error
GetWriterCookie(writerName string, writerSecret string) ([]byte, error)
SetWriterCookie(writerName string, writerSecret string, cookie []byte) error
RegisterWriter(writerName string, writerSecret string) error
TableSchema(familyName string, tableName string) (*schema.Table, error)
FamilySchemas(familyName string) ([]schema.Table, error)
ReadRow(familyName string, tableName string, where map[string]interface{}) (map[string]interface{}, error)
ReadTableSizeLimits() (limits.TableSizeLimits, error)
UpdateTableSizeLimit(limit limits.TableSizeLimit) error
DeleteTableSizeLimit(table schema.FamilyTable) error
ReadWriterRateLimits() (limits.WriterRateLimits, error)
UpdateWriterRateLimit(limit limits.WriterRateLimit) error
DeleteWriterRateLimit(writerName string) error
ClearTable(table schema.FamilyTable) error
DropTable(table schema.FamilyTable) error
ReadFamilyTableNames(familyName schema.FamilyName) ([]schema.FamilyTable, error)
}
type ExecutiveService ¶
func ExecutiveServiceFromConfig ¶
func ExecutiveServiceFromConfig(config ExecutiveServiceConfig) (ExecutiveService, error)
type ExecutiveServiceConfig ¶
type HealthChecker ¶
type HealthChecker interface {
HealthCheck() error
}
type SQLDBClient ¶
type SQLDBClient interface {
ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
PrepareContext(context.Context, string) (*sql.Stmt, error)
QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}
SQLDBClient allows generalizing several database/sql types
type TestExecutiveService ¶
func NewTestExecutiveService ¶
func NewTestExecutiveService(bindTo string) (*TestExecutiveService, error)
func (*TestExecutiveService) Close ¶
func (s *TestExecutiveService) Close() error
func (*TestExecutiveService) ExecutiveInterface ¶
func (s *TestExecutiveService) ExecutiveInterface() ExecutiveInterface
func (*TestExecutiveService) ServeHTTP ¶
func (s *TestExecutiveService) ServeHTTP(w http.ResponseWriter, r *http.Request)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.