Documentation ¶
Index ¶
- Constants
- Variables
- func BadRequest(field, desc string) error
- func IsNotFound(err error) bool
- type EventHandler
- type Group
- type HasMetadata
- type IndexRule
- type IndexRuleBinding
- type Kind
- type ListOpt
- type Measure
- type Metadata
- type Property
- type Registry
- type RegistryOption
- type Spec
- type Stream
- type TopNAggregation
- type TypeMeta
Constants ¶
View Source
const ( MeasureKeyPrefix = "/measures/" TagTypeID = "id" )
View Source
const KindMask = KindGroup | KindStream | KindMeasure | KindIndexRuleBinding | KindIndexRule | KindTopNAggregation
Variables ¶
View Source
var ( ErrGRPCInvalidArgument = statusGRPCInvalidArgument.Err() ErrGRPCResourceNotFound = statusGRPCResourceNotFound.Err() ErrGRPCAlreadyExists = statusGRPCAlreadyExists.Err() ErrGRPCDataLoss = statusDataLoss.Err() )
View Source
var ( ErrUnexpectedNumberOfEntities = errors.New("unexpected number of entities") ErrConcurrentModification = errors.New("concurrent modification of entities") )
View Source
var ( GroupsKeyPrefix = "/groups/" GroupMetadataKey = "/__meta_group__" )
View Source
var ( IndexRuleBindingKeyPrefix = "/index-rule-bindings/" IndexRuleKeyPrefix = "/index-rules/" )
View Source
var (
ErrUnsupportedEntityType = errors.New("unsupported entity type")
)
View Source
var PropertyKeyPrefix = "/properties/"
View Source
var StreamKeyPrefix = "/streams/"
View Source
var TopNAggregationKeyPrefix = "/topnagg/"
Functions ¶
func BadRequest ¶
BadRequest creates a gRPC error with error details with type BadRequest, which describes violations in a client request.
func IsNotFound ¶
Types ¶
type EventHandler ¶
type Group ¶
type Group interface { GetGroup(ctx context.Context, group string) (*commonv1.Group, error) ListGroup(ctx context.Context) ([]*commonv1.Group, error) // DeleteGroup delete all items belonging to the group DeleteGroup(ctx context.Context, group string) (bool, error) CreateGroup(ctx context.Context, group *commonv1.Group) error UpdateGroup(ctx context.Context, group *commonv1.Group) error }
type IndexRule ¶
type IndexRule interface { GetIndexRule(ctx context.Context, metadata *commonv1.Metadata) (*databasev1.IndexRule, error) ListIndexRule(ctx context.Context, opt ListOpt) ([]*databasev1.IndexRule, error) CreateIndexRule(ctx context.Context, indexRule *databasev1.IndexRule) error UpdateIndexRule(ctx context.Context, indexRule *databasev1.IndexRule) error DeleteIndexRule(ctx context.Context, metadata *commonv1.Metadata) (bool, error) }
type IndexRuleBinding ¶
type IndexRuleBinding interface { GetIndexRuleBinding(ctx context.Context, metadata *commonv1.Metadata) (*databasev1.IndexRuleBinding, error) ListIndexRuleBinding(ctx context.Context, opt ListOpt) ([]*databasev1.IndexRuleBinding, error) CreateIndexRuleBinding(ctx context.Context, indexRuleBinding *databasev1.IndexRuleBinding) error UpdateIndexRuleBinding(ctx context.Context, indexRuleBinding *databasev1.IndexRuleBinding) error DeleteIndexRuleBinding(ctx context.Context, metadata *commonv1.Metadata) (bool, error) }
type Measure ¶
type Measure interface { GetMeasure(ctx context.Context, metadata *commonv1.Metadata) (*databasev1.Measure, error) ListMeasure(ctx context.Context, opt ListOpt) ([]*databasev1.Measure, error) CreateMeasure(ctx context.Context, measure *databasev1.Measure) error UpdateMeasure(ctx context.Context, measure *databasev1.Measure) error DeleteMeasure(ctx context.Context, metadata *commonv1.Metadata) (bool, error) RegisterHandler(Kind, EventHandler) }
type Metadata ¶
type Property ¶
type Property interface { GetProperty(ctx context.Context, metadata *propertyv1.Metadata) (*propertyv1.Property, error) ListProperty(ctx context.Context, container *commonv1.Metadata) ([]*propertyv1.Property, error) CreateProperty(ctx context.Context, property *propertyv1.Property) error UpdateProperty(ctx context.Context, property *propertyv1.Property) error DeleteProperty(ctx context.Context, metadata *propertyv1.Metadata) (bool, error) }
type Registry ¶
type Registry interface { io.Closer ReadyNotify() <-chan struct{} StopNotify() <-chan struct{} StoppingNotify() <-chan struct{} Stream IndexRule IndexRuleBinding Measure Group TopNAggregation Property }
func NewEtcdSchemaRegistry ¶
func NewEtcdSchemaRegistry(options ...RegistryOption) (Registry, error)
type RegistryOption ¶
type RegistryOption func(*etcdSchemaRegistryConfig)
func ConfigureListener ¶
func ConfigureListener(lc, lp string) RegistryOption
func LoggerLevel ¶
func LoggerLevel(loggerLevel string) RegistryOption
func RootDir ¶
func RootDir(rootDir string) RegistryOption
type Stream ¶
type Stream interface { GetStream(ctx context.Context, metadata *commonv1.Metadata) (*databasev1.Stream, error) ListStream(ctx context.Context, opt ListOpt) ([]*databasev1.Stream, error) CreateStream(ctx context.Context, stream *databasev1.Stream) error UpdateStream(ctx context.Context, stream *databasev1.Stream) error DeleteStream(ctx context.Context, metadata *commonv1.Metadata) (bool, error) RegisterHandler(Kind, EventHandler) }
type TopNAggregation ¶
type TopNAggregation interface { GetTopNAggregation(ctx context.Context, metadata *commonv1.Metadata) (*databasev1.TopNAggregation, error) ListTopNAggregation(ctx context.Context, opt ListOpt) ([]*databasev1.TopNAggregation, error) CreateTopNAggregation(ctx context.Context, measure *databasev1.TopNAggregation) error UpdateTopNAggregation(ctx context.Context, measure *databasev1.TopNAggregation) error DeleteTopNAggregation(ctx context.Context, metadata *commonv1.Metadata) (bool, error) }
Click to show internal directories.
Click to hide internal directories.