model

package
v0.0.0-...-e9fe53c Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotificationTypeCreateCollection = "create_collection"
	NotificationTypeDeleteCollection = "delete_collection"
)
View Source
const (
	NotificationStatusPending = "pending"
)

Variables

This section is empty.

Functions

func FilterCollection

func FilterCollection(collection *Collection, collectionID types.UniqueID, collectionName *string) bool

func FilterSegments

func FilterSegments(segment *Segment, segmentID types.UniqueID, segmentType *string, scope *string, topic *string, collectionID types.UniqueID) bool

Types

type Collection

type Collection struct {
	ID                   types.UniqueID
	Name                 string
	ConfigurationJsonStr string
	Dimension            *int32
	Metadata             *CollectionMetadata[CollectionMetadataValueType]
	TenantID             string
	DatabaseName         string
	Ts                   types.Timestamp
	LogPosition          int64
	Version              int32
}

type CollectionMetadata

type CollectionMetadata[T CollectionMetadataValueType] struct {
	Metadata map[string]T
}

func NewCollectionMetadata

func NewCollectionMetadata[T CollectionMetadataValueType]() *CollectionMetadata[T]

func (*CollectionMetadata[T]) Add

func (m *CollectionMetadata[T]) Add(key string, value T)

func (*CollectionMetadata[T]) Empty

func (m *CollectionMetadata[T]) Empty() bool

func (*CollectionMetadata[T]) Equals

func (m *CollectionMetadata[T]) Equals(other *CollectionMetadata[T]) bool

func (*CollectionMetadata[T]) Get

func (m *CollectionMetadata[T]) Get(key string) T

func (*CollectionMetadata[T]) Remove

func (m *CollectionMetadata[T]) Remove(key string)

type CollectionMetadataValueBoolType

type CollectionMetadataValueBoolType struct {
	Value bool
}

func (*CollectionMetadataValueBoolType) Equals

func (*CollectionMetadataValueBoolType) IsCollectionMetadataValueType

func (s *CollectionMetadataValueBoolType) IsCollectionMetadataValueType()

type CollectionMetadataValueFloat64Type

type CollectionMetadataValueFloat64Type struct {
	Value float64
}

func (*CollectionMetadataValueFloat64Type) Equals

func (*CollectionMetadataValueFloat64Type) IsCollectionMetadataValueType

func (s *CollectionMetadataValueFloat64Type) IsCollectionMetadataValueType()

type CollectionMetadataValueInt64Type

type CollectionMetadataValueInt64Type struct {
	Value int64
}

func (*CollectionMetadataValueInt64Type) Equals

func (*CollectionMetadataValueInt64Type) IsCollectionMetadataValueType

func (s *CollectionMetadataValueInt64Type) IsCollectionMetadataValueType()

type CollectionMetadataValueStringType

type CollectionMetadataValueStringType struct {
	Value string
}

func (*CollectionMetadataValueStringType) Equals

func (*CollectionMetadataValueStringType) IsCollectionMetadataValueType

func (s *CollectionMetadataValueStringType) IsCollectionMetadataValueType()

type CollectionMetadataValueType

type CollectionMetadataValueType interface {
	IsCollectionMetadataValueType()
	Equals(other CollectionMetadataValueType) bool
}

type CreateCollection

type CreateCollection struct {
	ID                   types.UniqueID
	Name                 string
	ConfigurationJsonStr string
	Dimension            *int32
	Metadata             *CollectionMetadata[CollectionMetadataValueType]
	GetOrCreate          bool
	TenantID             string
	DatabaseName         string
	Ts                   types.Timestamp
}

type CreateDatabase

type CreateDatabase struct {
	ID     string
	Name   string
	Tenant string
	Ts     types.Timestamp
}

type CreateSegment

type CreateSegment struct {
	ID           types.UniqueID
	Type         string
	Scope        string
	CollectionID types.UniqueID
	Metadata     *SegmentMetadata[SegmentMetadataValueType]
	Ts           types.Timestamp
}

type CreateTenant

type CreateTenant struct {
	Name string
	Ts   types.Timestamp
}

type Database

type Database struct {
	ID     string
	Name   string
	Tenant string
	Ts     types.Timestamp
}

type DeleteCollection

type DeleteCollection struct {
	ID           types.UniqueID
	TenantID     string
	DatabaseName string
	Ts           types.Timestamp
}

type FlushCollectionCompaction

type FlushCollectionCompaction struct {
	ID                       types.UniqueID
	TenantID                 string
	LogPosition              int64
	CurrentCollectionVersion int32
	FlushSegmentCompactions  []*FlushSegmentCompaction
}

type FlushCollectionInfo

type FlushCollectionInfo struct {
	ID                       string
	CollectionVersion        int32
	TenantLastCompactionTime int64
}

type FlushSegmentCompaction

type FlushSegmentCompaction struct {
	ID        types.UniqueID
	FilePaths map[string][]string
}

type GetDatabase

type GetDatabase struct {
	ID     string
	Name   string
	Tenant string
	Ts     types.Timestamp
}

type GetSegments

type GetSegments struct {
	ID           types.UniqueID
	Type         *string
	Scope        *string
	CollectionID types.UniqueID
}

type GetTenant

type GetTenant struct {
	Name string
	Ts   types.Timestamp
}

type Notification

type Notification struct {
	ID           int64
	CollectionID string
	Type         string
	Status       string
}

type Segment

type Segment struct {
	ID           types.UniqueID
	Type         string
	Scope        string
	CollectionID types.UniqueID
	Metadata     *SegmentMetadata[SegmentMetadataValueType]
	Ts           types.Timestamp
	FilePaths    map[string][]string
}

type SegmentMetadata

type SegmentMetadata[T SegmentMetadataValueType] struct {
	Metadata map[string]T
}

func NewSegmentMetadata

func NewSegmentMetadata[T SegmentMetadataValueType]() *SegmentMetadata[T]

func (*SegmentMetadata[T]) Empty

func (m *SegmentMetadata[T]) Empty() bool

func (*SegmentMetadata[T]) Get

func (m *SegmentMetadata[T]) Get(key string) T

func (*SegmentMetadata[T]) Keys

func (m *SegmentMetadata[T]) Keys() []string

func (*SegmentMetadata[T]) Remove

func (m *SegmentMetadata[T]) Remove(key string)

func (*SegmentMetadata[T]) Set

func (m *SegmentMetadata[T]) Set(key string, value T)

type SegmentMetadataValueBoolType

type SegmentMetadataValueBoolType struct {
	Value bool
}

func (*SegmentMetadataValueBoolType) IsSegmentMetadataValueType

func (s *SegmentMetadataValueBoolType) IsSegmentMetadataValueType()

type SegmentMetadataValueFloat64Type

type SegmentMetadataValueFloat64Type struct {
	Value float64
}

func (*SegmentMetadataValueFloat64Type) IsSegmentMetadataValueType

func (s *SegmentMetadataValueFloat64Type) IsSegmentMetadataValueType()

type SegmentMetadataValueInt64Type

type SegmentMetadataValueInt64Type struct {
	Value int64
}

func (*SegmentMetadataValueInt64Type) IsSegmentMetadataValueType

func (s *SegmentMetadataValueInt64Type) IsSegmentMetadataValueType()

type SegmentMetadataValueStringType

type SegmentMetadataValueStringType struct {
	Value string
}

func (*SegmentMetadataValueStringType) IsSegmentMetadataValueType

func (s *SegmentMetadataValueStringType) IsSegmentMetadataValueType()

type SegmentMetadataValueType

type SegmentMetadataValueType interface {
	IsSegmentMetadataValueType()
}

type Tenant

type Tenant struct {
	Name string
}

type TenantLastCompactionTime

type TenantLastCompactionTime struct {
	ID string
	Ts types.Timestamp
}

type UpdateCollection

type UpdateCollection struct {
	ID            types.UniqueID
	Name          *string
	Dimension     *int32
	Metadata      *CollectionMetadata[CollectionMetadataValueType]
	ResetMetadata bool
	TenantID      string
	DatabaseName  string
	Ts            types.Timestamp
}

type UpdateSegment

type UpdateSegment struct {
	ID            types.UniqueID
	ResetTopic    bool
	Collection    *string
	Metadata      *SegmentMetadata[SegmentMetadataValueType]
	ResetMetadata bool
	Ts            types.Timestamp
}

Jump to

Keyboard shortcuts

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