blocksconvert

package
v1.4.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: Apache-2.0, Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthScheduler = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowScheduler   = fmt.Errorf("proto: integer overflow")
)
View Source
var AllowAllUsers = AllowedUsers(nil)

Functions

func ErrorFilename

func ErrorFilename(planBaseName string) string

func FinishedFilename

func FinishedFilename(planBaseName string, id ulid.ULID) string

func IsErrorFilename

func IsErrorFilename(name string) (bool, string)

func IsFinishedFilename

func IsFinishedFilename(name string) (bool, string, ulid.ULID)

func IsPlanFilename

func IsPlanFilename(name string) (bool, string)

Returns true and "base name" or false and empty string.

func IsProgressFilename

func IsProgressFilename(name string) (bool, string, time.Time)

func PreparePlanFileReader

func PreparePlanFileReader(planFile string, in io.Reader) (io.Reader, error)

func ProgressFilename

func ProgressFilename(planBaseName string, t time.Time) string

func RegisterSchedulerServer

func RegisterSchedulerServer(s *grpc.Server, srv SchedulerServer)

func StartingFilename

func StartingFilename(planBaseName string, t time.Time) string

Types

type AllowedUsers

type AllowedUsers map[string]struct{}

func ParseAllowedUsers

func ParseAllowedUsers(commaSeparated string) AllowedUsers

func ParseAllowedUsersFromFile

func ParseAllowedUsersFromFile(file string) (AllowedUsers, error)

func (AllowedUsers) AllUsersAllowed

func (a AllowedUsers) AllUsersAllowed() bool

func (AllowedUsers) GetAllowedUsers

func (a AllowedUsers) GetAllowedUsers(users []string) []string

func (AllowedUsers) IsAllowed

func (a AllowedUsers) IsAllowed(user string) bool

type NextPlanRequest

type NextPlanRequest struct {
	BuilderName string `protobuf:"bytes,1,opt,name=builderName,proto3" json:"builderName,omitempty"`
}

func (*NextPlanRequest) Descriptor

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

func (*NextPlanRequest) Equal

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

func (*NextPlanRequest) GetBuilderName

func (m *NextPlanRequest) GetBuilderName() string

func (*NextPlanRequest) GoString

func (this *NextPlanRequest) GoString() string

func (*NextPlanRequest) Marshal

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

func (*NextPlanRequest) MarshalTo

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

func (*NextPlanRequest) MarshalToSizedBuffer

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

func (*NextPlanRequest) ProtoMessage

func (*NextPlanRequest) ProtoMessage()

func (*NextPlanRequest) Reset

func (m *NextPlanRequest) Reset()

func (*NextPlanRequest) Size

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

func (*NextPlanRequest) String

func (this *NextPlanRequest) String() string

func (*NextPlanRequest) Unmarshal

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

func (*NextPlanRequest) XXX_DiscardUnknown

func (m *NextPlanRequest) XXX_DiscardUnknown()

func (*NextPlanRequest) XXX_Marshal

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

func (*NextPlanRequest) XXX_Merge

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

func (*NextPlanRequest) XXX_Size

func (m *NextPlanRequest) XXX_Size() int

func (*NextPlanRequest) XXX_Unmarshal

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

type NextPlanResponse

type NextPlanResponse struct {
	PlanFile     string `protobuf:"bytes,1,opt,name=planFile,proto3" json:"planFile,omitempty"`
	ProgressFile string `protobuf:"bytes,2,opt,name=progressFile,proto3" json:"progressFile,omitempty"`
}

func (*NextPlanResponse) Descriptor

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

func (*NextPlanResponse) Equal

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

func (*NextPlanResponse) GetPlanFile

func (m *NextPlanResponse) GetPlanFile() string

func (*NextPlanResponse) GetProgressFile

func (m *NextPlanResponse) GetProgressFile() string

func (*NextPlanResponse) GoString

func (this *NextPlanResponse) GoString() string

func (*NextPlanResponse) Marshal

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

func (*NextPlanResponse) MarshalTo

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

func (*NextPlanResponse) MarshalToSizedBuffer

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

func (*NextPlanResponse) ProtoMessage

func (*NextPlanResponse) ProtoMessage()

func (*NextPlanResponse) Reset

func (m *NextPlanResponse) Reset()

func (*NextPlanResponse) Size

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

func (*NextPlanResponse) String

func (this *NextPlanResponse) String() string

func (*NextPlanResponse) Unmarshal

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

func (*NextPlanResponse) XXX_DiscardUnknown

func (m *NextPlanResponse) XXX_DiscardUnknown()

func (*NextPlanResponse) XXX_Marshal

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

func (*NextPlanResponse) XXX_Merge

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

func (*NextPlanResponse) XXX_Size

func (m *NextPlanResponse) XXX_Size() int

func (*NextPlanResponse) XXX_Unmarshal

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

type PlanEntry

type PlanEntry struct {
	// Header
	User     string `json:"user"`
	DayIndex int    `json:"day_index"`

	// Entries
	SeriesID string   `json:"sid"`
	Chunks   []string `json:"cs"`

	// Footer
	Complete bool `json:"complete"`
}

func (*PlanEntry) Reset

func (pe *PlanEntry) Reset()

type SchedulerClient

type SchedulerClient interface {
	// Returns next plan that builder should work on.
	NextPlan(ctx context.Context, in *NextPlanRequest, opts ...grpc.CallOption) (*NextPlanResponse, error)
}

SchedulerClient is the client API for Scheduler service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSchedulerClient

func NewSchedulerClient(cc *grpc.ClientConn) SchedulerClient

type SchedulerServer

type SchedulerServer interface {
	// Returns next plan that builder should work on.
	NextPlan(context.Context, *NextPlanRequest) (*NextPlanResponse, error)
}

SchedulerServer is the server API for Scheduler service.

type SharedConfig

type SharedConfig struct {
	SchemaConfig  chunk.SchemaConfig // Flags registered by main.go
	StorageConfig storage.Config

	Bucket       tsdb.BucketConfig
	BucketPrefix string
}

func (*SharedConfig) GetBucket

func (cfg *SharedConfig) GetBucket(l log.Logger, reg prometheus.Registerer) (objstore.Bucket, error)

func (*SharedConfig) RegisterFlags

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

type UnimplementedSchedulerServer

type UnimplementedSchedulerServer struct {
}

UnimplementedSchedulerServer can be embedded to have forward compatible implementations.

func (*UnimplementedSchedulerServer) NextPlan

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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