purger

package
v0.7.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthDeletePlan = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDeletePlan   = fmt.Errorf("proto: integer overflow")
)

Functions

This section is empty.

Types

type ChunkDetails

type ChunkDetails struct {
	ID                       string    `protobuf:"bytes,1,opt,name=ID,json=iD,proto3" json:"ID,omitempty"`
	PartiallyDeletedInterval *Interval `` /* 135-byte string literal not displayed */
}

func (*ChunkDetails) Descriptor

func (*ChunkDetails) Descriptor() ([]byte, []int)

func (*ChunkDetails) Equal

func (this *ChunkDetails) Equal(that interface{}) bool

func (*ChunkDetails) GetID

func (m *ChunkDetails) GetID() string

func (*ChunkDetails) GetPartiallyDeletedInterval

func (m *ChunkDetails) GetPartiallyDeletedInterval() *Interval

func (*ChunkDetails) GoString

func (this *ChunkDetails) GoString() string

func (*ChunkDetails) Marshal

func (m *ChunkDetails) Marshal() (dAtA []byte, err error)

func (*ChunkDetails) MarshalTo

func (m *ChunkDetails) MarshalTo(dAtA []byte) (int, error)

func (*ChunkDetails) MarshalToSizedBuffer

func (m *ChunkDetails) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ChunkDetails) ProtoMessage

func (*ChunkDetails) ProtoMessage()

func (*ChunkDetails) Reset

func (m *ChunkDetails) Reset()

func (*ChunkDetails) Size

func (m *ChunkDetails) Size() (n int)

func (*ChunkDetails) String

func (this *ChunkDetails) String() string

func (*ChunkDetails) Unmarshal

func (m *ChunkDetails) Unmarshal(dAtA []byte) error

func (*ChunkDetails) XXX_DiscardUnknown

func (m *ChunkDetails) XXX_DiscardUnknown()

func (*ChunkDetails) XXX_Marshal

func (m *ChunkDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChunkDetails) XXX_Merge

func (m *ChunkDetails) XXX_Merge(src proto.Message)

func (*ChunkDetails) XXX_Size

func (m *ChunkDetails) XXX_Size() int

func (*ChunkDetails) XXX_Unmarshal

func (m *ChunkDetails) XXX_Unmarshal(b []byte) error

type ChunksGroup

type ChunksGroup struct {
	Labels []github_com_cortexproject_cortex_pkg_ingester_client.LabelAdapter `` /* 131-byte string literal not displayed */
	Chunks []ChunkDetails                                                     `protobuf:"bytes,2,rep,name=chunks,proto3" json:"chunks"`
}

ChunksGroup holds ChunkDetails and Labels for a group of chunks which have same series ID

func (*ChunksGroup) Descriptor

func (*ChunksGroup) Descriptor() ([]byte, []int)

func (*ChunksGroup) Equal

func (this *ChunksGroup) Equal(that interface{}) bool

func (*ChunksGroup) GetChunks

func (m *ChunksGroup) GetChunks() []ChunkDetails

func (*ChunksGroup) GoString

func (this *ChunksGroup) GoString() string

func (*ChunksGroup) Marshal

func (m *ChunksGroup) Marshal() (dAtA []byte, err error)

func (*ChunksGroup) MarshalTo

func (m *ChunksGroup) MarshalTo(dAtA []byte) (int, error)

func (*ChunksGroup) MarshalToSizedBuffer

func (m *ChunksGroup) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ChunksGroup) ProtoMessage

func (*ChunksGroup) ProtoMessage()

func (*ChunksGroup) Reset

func (m *ChunksGroup) Reset()

func (*ChunksGroup) Size

func (m *ChunksGroup) Size() (n int)

func (*ChunksGroup) String

func (this *ChunksGroup) String() string

func (*ChunksGroup) Unmarshal

func (m *ChunksGroup) Unmarshal(dAtA []byte) error

func (*ChunksGroup) XXX_DiscardUnknown

func (m *ChunksGroup) XXX_DiscardUnknown()

func (*ChunksGroup) XXX_Marshal

func (m *ChunksGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChunksGroup) XXX_Merge

func (m *ChunksGroup) XXX_Merge(src proto.Message)

func (*ChunksGroup) XXX_Size

func (m *ChunksGroup) XXX_Size() int

func (*ChunksGroup) XXX_Unmarshal

func (m *ChunksGroup) XXX_Unmarshal(b []byte) error

type Config

type Config struct {
	Enable          bool   `yaml:"enable"`
	NumWorkers      int    `yaml:"num_workers"`
	ObjectStoreType string `yaml:"object_store_type"`
}

Config holds config for DataPurger

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(f *flag.FlagSet)

RegisterFlags registers CLI flags for Config

type DataPurger

type DataPurger struct {
	services.Service
	// contains filtered or unexported fields
}

DataPurger does the purging of data which is requested to be deleted

func NewDataPurger

func NewDataPurger(cfg Config, deleteStore *chunk.DeleteStore, chunkStore chunk.Store, storageClient chunk.ObjectClient) (*DataPurger, error)

NewDataPurger creates a new DataPurger

type DeletePlan

type DeletePlan struct {
	PlanInterval *Interval     `protobuf:"bytes,1,opt,name=plan_interval,json=planInterval,proto3" json:"plan_interval,omitempty"`
	ChunksGroup  []ChunksGroup `protobuf:"bytes,2,rep,name=chunks_group,json=chunksGroup,proto3" json:"chunks_group"`
}

DeletePlan holds all the chunks that are supposed to be deleted within an interval(usually a day) This Proto file is used just for storing Delete Plans in proto format.

func (*DeletePlan) Descriptor

func (*DeletePlan) Descriptor() ([]byte, []int)

func (*DeletePlan) Equal

func (this *DeletePlan) Equal(that interface{}) bool

func (*DeletePlan) GetChunksGroup

func (m *DeletePlan) GetChunksGroup() []ChunksGroup

func (*DeletePlan) GetPlanInterval

func (m *DeletePlan) GetPlanInterval() *Interval

func (*DeletePlan) GoString

func (this *DeletePlan) GoString() string

func (*DeletePlan) Marshal

func (m *DeletePlan) Marshal() (dAtA []byte, err error)

func (*DeletePlan) MarshalTo

func (m *DeletePlan) MarshalTo(dAtA []byte) (int, error)

func (*DeletePlan) MarshalToSizedBuffer

func (m *DeletePlan) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DeletePlan) ProtoMessage

func (*DeletePlan) ProtoMessage()

func (*DeletePlan) Reset

func (m *DeletePlan) Reset()

func (*DeletePlan) Size

func (m *DeletePlan) Size() (n int)

func (*DeletePlan) String

func (this *DeletePlan) String() string

func (*DeletePlan) Unmarshal

func (m *DeletePlan) Unmarshal(dAtA []byte) error

func (*DeletePlan) XXX_DiscardUnknown

func (m *DeletePlan) XXX_DiscardUnknown()

func (*DeletePlan) XXX_Marshal

func (m *DeletePlan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeletePlan) XXX_Merge

func (m *DeletePlan) XXX_Merge(src proto.Message)

func (*DeletePlan) XXX_Size

func (m *DeletePlan) XXX_Size() int

func (*DeletePlan) XXX_Unmarshal

func (m *DeletePlan) XXX_Unmarshal(b []byte) error

type DeleteRequestHandler

type DeleteRequestHandler struct {
	// contains filtered or unexported fields
}

DeleteRequestHandler provides handlers for delete requests

func NewDeleteRequestHandler

func NewDeleteRequestHandler(deleteStore *chunk.DeleteStore) (*DeleteRequestHandler, error)

NewDeleteRequestHandler creates a DeleteRequestHandler

func (*DeleteRequestHandler) AddDeleteRequestHandler

func (dm *DeleteRequestHandler) AddDeleteRequestHandler(w http.ResponseWriter, r *http.Request)

AddDeleteRequestHandler handles addition of new delete request

func (*DeleteRequestHandler) GetAllDeleteRequestsHandler

func (dm *DeleteRequestHandler) GetAllDeleteRequestsHandler(w http.ResponseWriter, r *http.Request)

GetAllDeleteRequestsHandler handles get all delete requests

type Interval

type Interval struct {
	StartTimestampMs int64 `protobuf:"varint,1,opt,name=start_timestamp_ms,json=startTimestampMs,proto3" json:"start_timestamp_ms,omitempty"`
	EndTimestampMs   int64 `protobuf:"varint,2,opt,name=end_timestamp_ms,json=endTimestampMs,proto3" json:"end_timestamp_ms,omitempty"`
}

func (*Interval) Descriptor

func (*Interval) Descriptor() ([]byte, []int)

func (*Interval) Equal

func (this *Interval) Equal(that interface{}) bool

func (*Interval) GetEndTimestampMs

func (m *Interval) GetEndTimestampMs() int64

func (*Interval) GetStartTimestampMs

func (m *Interval) GetStartTimestampMs() int64

func (*Interval) GoString

func (this *Interval) GoString() string

func (*Interval) Marshal

func (m *Interval) Marshal() (dAtA []byte, err error)

func (*Interval) MarshalTo

func (m *Interval) MarshalTo(dAtA []byte) (int, error)

func (*Interval) MarshalToSizedBuffer

func (m *Interval) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Interval) ProtoMessage

func (*Interval) ProtoMessage()

func (*Interval) Reset

func (m *Interval) Reset()

func (*Interval) Size

func (m *Interval) Size() (n int)

func (*Interval) String

func (this *Interval) String() string

func (*Interval) Unmarshal

func (m *Interval) Unmarshal(dAtA []byte) error

func (*Interval) XXX_DiscardUnknown

func (m *Interval) XXX_DiscardUnknown()

func (*Interval) XXX_Marshal

func (m *Interval) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Interval) XXX_Merge

func (m *Interval) XXX_Merge(src proto.Message)

func (*Interval) XXX_Size

func (m *Interval) XXX_Size() int

func (*Interval) XXX_Unmarshal

func (m *Interval) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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