schedulerpb

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2021 License: Apache-2.0 Imports: 14 Imported by: 1

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 FrontendToSchedulerType_name = map[int32]string{
	0: "INIT",
	1: "ENQUEUE",
	2: "CANCEL",
}
View Source
var FrontendToSchedulerType_value = map[string]int32{
	"INIT":    0,
	"ENQUEUE": 1,
	"CANCEL":  2,
}
View Source
var SchedulerToFrontendStatus_name = map[int32]string{
	0: "OK",
	1: "TOO_MANY_REQUESTS_PER_TENANT",
	2: "ERROR",
	3: "SHUTTING_DOWN",
}
View Source
var SchedulerToFrontendStatus_value = map[string]int32{
	"OK":                           0,
	"TOO_MANY_REQUESTS_PER_TENANT": 1,
	"ERROR":                        2,
	"SHUTTING_DOWN":                3,
}

Functions

func RegisterSchedulerForFrontendServer

func RegisterSchedulerForFrontendServer(s *grpc.Server, srv SchedulerForFrontendServer)

func RegisterSchedulerForQuerierServer

func RegisterSchedulerForQuerierServer(s *grpc.Server, srv SchedulerForQuerierServer)

Types

type FrontendToScheduler

type FrontendToScheduler struct {
	Type FrontendToSchedulerType `protobuf:"varint,1,opt,name=type,proto3,enum=schedulerpb.FrontendToSchedulerType" json:"type,omitempty"`
	// Used by INIT message. Will be put into all requests passed to querier.
	FrontendAddress string `protobuf:"bytes,2,opt,name=frontendAddress,proto3" json:"frontendAddress,omitempty"`
	// Used by ENQUEUE and CANCEL.
	// Each frontend manages its own queryIDs. Different frontends may use same set of query IDs.
	QueryID uint64 `protobuf:"varint,3,opt,name=queryID,proto3" json:"queryID,omitempty"`
	// Following are used by ENQUEUE only.
	UserID       string                `protobuf:"bytes,4,opt,name=userID,proto3" json:"userID,omitempty"`
	HttpRequest  *httpgrpc.HTTPRequest `protobuf:"bytes,5,opt,name=httpRequest,proto3" json:"httpRequest,omitempty"`
	StatsEnabled bool                  `protobuf:"varint,6,opt,name=statsEnabled,proto3" json:"statsEnabled,omitempty"`
}

func (*FrontendToScheduler) Descriptor

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

func (*FrontendToScheduler) Equal

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

func (*FrontendToScheduler) GetFrontendAddress

func (m *FrontendToScheduler) GetFrontendAddress() string

func (*FrontendToScheduler) GetHttpRequest

func (m *FrontendToScheduler) GetHttpRequest() *httpgrpc.HTTPRequest

func (*FrontendToScheduler) GetQueryID

func (m *FrontendToScheduler) GetQueryID() uint64

func (*FrontendToScheduler) GetStatsEnabled added in v1.7.0

func (m *FrontendToScheduler) GetStatsEnabled() bool

func (*FrontendToScheduler) GetType

func (*FrontendToScheduler) GetUserID

func (m *FrontendToScheduler) GetUserID() string

func (*FrontendToScheduler) GoString

func (this *FrontendToScheduler) GoString() string

func (*FrontendToScheduler) Marshal

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

func (*FrontendToScheduler) MarshalTo

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

func (*FrontendToScheduler) MarshalToSizedBuffer

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

func (*FrontendToScheduler) ProtoMessage

func (*FrontendToScheduler) ProtoMessage()

func (*FrontendToScheduler) Reset

func (m *FrontendToScheduler) Reset()

func (*FrontendToScheduler) Size

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

func (*FrontendToScheduler) String

func (this *FrontendToScheduler) String() string

func (*FrontendToScheduler) Unmarshal

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

func (*FrontendToScheduler) XXX_DiscardUnknown

func (m *FrontendToScheduler) XXX_DiscardUnknown()

func (*FrontendToScheduler) XXX_Marshal

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

func (*FrontendToScheduler) XXX_Merge

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

func (*FrontendToScheduler) XXX_Size

func (m *FrontendToScheduler) XXX_Size() int

func (*FrontendToScheduler) XXX_Unmarshal

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

type FrontendToSchedulerType

type FrontendToSchedulerType int32
const (
	INIT    FrontendToSchedulerType = 0
	ENQUEUE FrontendToSchedulerType = 1
	CANCEL  FrontendToSchedulerType = 2
)

func (FrontendToSchedulerType) EnumDescriptor

func (FrontendToSchedulerType) EnumDescriptor() ([]byte, []int)

func (FrontendToSchedulerType) String

func (x FrontendToSchedulerType) String() string

type QuerierToScheduler

type QuerierToScheduler struct {
	QuerierID string `protobuf:"bytes,1,opt,name=querierID,proto3" json:"querierID,omitempty"`
}

Querier reports its own clientID when it connects, so that scheduler knows how many *different* queriers are connected. To signal that querier is ready to accept another request, querier sends empty message.

func (*QuerierToScheduler) Descriptor

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

func (*QuerierToScheduler) Equal

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

func (*QuerierToScheduler) GetQuerierID

func (m *QuerierToScheduler) GetQuerierID() string

func (*QuerierToScheduler) GoString

func (this *QuerierToScheduler) GoString() string

func (*QuerierToScheduler) Marshal

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

func (*QuerierToScheduler) MarshalTo

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

func (*QuerierToScheduler) MarshalToSizedBuffer

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

func (*QuerierToScheduler) ProtoMessage

func (*QuerierToScheduler) ProtoMessage()

func (*QuerierToScheduler) Reset

func (m *QuerierToScheduler) Reset()

func (*QuerierToScheduler) Size

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

func (*QuerierToScheduler) String

func (this *QuerierToScheduler) String() string

func (*QuerierToScheduler) Unmarshal

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

func (*QuerierToScheduler) XXX_DiscardUnknown

func (m *QuerierToScheduler) XXX_DiscardUnknown()

func (*QuerierToScheduler) XXX_Marshal

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

func (*QuerierToScheduler) XXX_Merge

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

func (*QuerierToScheduler) XXX_Size

func (m *QuerierToScheduler) XXX_Size() int

func (*QuerierToScheduler) XXX_Unmarshal

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

type SchedulerForFrontendClient

type SchedulerForFrontendClient interface {
	// After calling this method, both Frontend and Scheduler enter a loop. Frontend will keep sending ENQUEUE and
	// CANCEL requests, and scheduler is expected to process them. Scheduler returns one response for each request.
	//
	// Long-running loop is used to detect broken connection between frontend and scheduler. This is important for both
	// parties... if connection breaks, frontend can cancel (and possibly retry on different scheduler) all pending
	// requests sent to this scheduler, while scheduler can cancel queued requests from given frontend.
	FrontendLoop(ctx context.Context, opts ...grpc.CallOption) (SchedulerForFrontend_FrontendLoopClient, error)
}

SchedulerForFrontendClient is the client API for SchedulerForFrontend service.

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

func NewSchedulerForFrontendClient

func NewSchedulerForFrontendClient(cc *grpc.ClientConn) SchedulerForFrontendClient

type SchedulerForFrontendServer

type SchedulerForFrontendServer interface {
	// After calling this method, both Frontend and Scheduler enter a loop. Frontend will keep sending ENQUEUE and
	// CANCEL requests, and scheduler is expected to process them. Scheduler returns one response for each request.
	//
	// Long-running loop is used to detect broken connection between frontend and scheduler. This is important for both
	// parties... if connection breaks, frontend can cancel (and possibly retry on different scheduler) all pending
	// requests sent to this scheduler, while scheduler can cancel queued requests from given frontend.
	FrontendLoop(SchedulerForFrontend_FrontendLoopServer) error
}

SchedulerForFrontendServer is the server API for SchedulerForFrontend service.

type SchedulerForFrontend_FrontendLoopClient

type SchedulerForFrontend_FrontendLoopClient interface {
	Send(*FrontendToScheduler) error
	Recv() (*SchedulerToFrontend, error)
	grpc.ClientStream
}

type SchedulerForFrontend_FrontendLoopServer

type SchedulerForFrontend_FrontendLoopServer interface {
	Send(*SchedulerToFrontend) error
	Recv() (*FrontendToScheduler, error)
	grpc.ServerStream
}

type SchedulerForQuerierClient

type SchedulerForQuerierClient interface {
	// After calling this method, both Querier and Scheduler enter a loop, in which querier waits for
	// "SchedulerToQuerier" messages containing HTTP requests and processes them. After processing the request,
	// querier signals that it is ready to accept another one by sending empty QuerierToScheduler message.
	//
	// Long-running loop is used to detect broken connection between scheduler and querier. This is important
	// for scheduler to keep a list of connected queriers up-to-date.
	QuerierLoop(ctx context.Context, opts ...grpc.CallOption) (SchedulerForQuerier_QuerierLoopClient, error)
}

SchedulerForQuerierClient is the client API for SchedulerForQuerier service.

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

func NewSchedulerForQuerierClient

func NewSchedulerForQuerierClient(cc *grpc.ClientConn) SchedulerForQuerierClient

type SchedulerForQuerierServer

type SchedulerForQuerierServer interface {
	// After calling this method, both Querier and Scheduler enter a loop, in which querier waits for
	// "SchedulerToQuerier" messages containing HTTP requests and processes them. After processing the request,
	// querier signals that it is ready to accept another one by sending empty QuerierToScheduler message.
	//
	// Long-running loop is used to detect broken connection between scheduler and querier. This is important
	// for scheduler to keep a list of connected queriers up-to-date.
	QuerierLoop(SchedulerForQuerier_QuerierLoopServer) error
}

SchedulerForQuerierServer is the server API for SchedulerForQuerier service.

type SchedulerForQuerier_QuerierLoopClient

type SchedulerForQuerier_QuerierLoopClient interface {
	Send(*QuerierToScheduler) error
	Recv() (*SchedulerToQuerier, error)
	grpc.ClientStream
}

type SchedulerForQuerier_QuerierLoopServer

type SchedulerForQuerier_QuerierLoopServer interface {
	Send(*SchedulerToQuerier) error
	Recv() (*QuerierToScheduler, error)
	grpc.ServerStream
}

type SchedulerToFrontend

type SchedulerToFrontend struct {
	Status SchedulerToFrontendStatus `protobuf:"varint,1,opt,name=status,proto3,enum=schedulerpb.SchedulerToFrontendStatus" json:"status,omitempty"`
	Error  string                    `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
}

func (*SchedulerToFrontend) Descriptor

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

func (*SchedulerToFrontend) Equal

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

func (*SchedulerToFrontend) GetError

func (m *SchedulerToFrontend) GetError() string

func (*SchedulerToFrontend) GetStatus

func (*SchedulerToFrontend) GoString

func (this *SchedulerToFrontend) GoString() string

func (*SchedulerToFrontend) Marshal

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

func (*SchedulerToFrontend) MarshalTo

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

func (*SchedulerToFrontend) MarshalToSizedBuffer

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

func (*SchedulerToFrontend) ProtoMessage

func (*SchedulerToFrontend) ProtoMessage()

func (*SchedulerToFrontend) Reset

func (m *SchedulerToFrontend) Reset()

func (*SchedulerToFrontend) Size

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

func (*SchedulerToFrontend) String

func (this *SchedulerToFrontend) String() string

func (*SchedulerToFrontend) Unmarshal

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

func (*SchedulerToFrontend) XXX_DiscardUnknown

func (m *SchedulerToFrontend) XXX_DiscardUnknown()

func (*SchedulerToFrontend) XXX_Marshal

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

func (*SchedulerToFrontend) XXX_Merge

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

func (*SchedulerToFrontend) XXX_Size

func (m *SchedulerToFrontend) XXX_Size() int

func (*SchedulerToFrontend) XXX_Unmarshal

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

type SchedulerToFrontendStatus

type SchedulerToFrontendStatus int32
const (
	OK                           SchedulerToFrontendStatus = 0
	TOO_MANY_REQUESTS_PER_TENANT SchedulerToFrontendStatus = 1
	ERROR                        SchedulerToFrontendStatus = 2
	SHUTTING_DOWN                SchedulerToFrontendStatus = 3
)

func (SchedulerToFrontendStatus) EnumDescriptor

func (SchedulerToFrontendStatus) EnumDescriptor() ([]byte, []int)

func (SchedulerToFrontendStatus) String

func (x SchedulerToFrontendStatus) String() string

type SchedulerToQuerier

type SchedulerToQuerier struct {
	// Query ID as reported by frontend. When querier sends the response back to frontend (using frontendAddress),
	// it identifies the query by using this ID.
	QueryID     uint64                `protobuf:"varint,1,opt,name=queryID,proto3" json:"queryID,omitempty"`
	HttpRequest *httpgrpc.HTTPRequest `protobuf:"bytes,2,opt,name=httpRequest,proto3" json:"httpRequest,omitempty"`
	// Where should querier send HTTP Response to (using FrontendForQuerier interface).
	FrontendAddress string `protobuf:"bytes,3,opt,name=frontendAddress,proto3" json:"frontendAddress,omitempty"`
	// User who initiated the request. Needed to send reply back to frontend.
	UserID string `protobuf:"bytes,4,opt,name=userID,proto3" json:"userID,omitempty"`
	// Whether query statistics tracking should be enabled. The response will include
	// statistics only when this option is enabled.
	StatsEnabled bool `protobuf:"varint,5,opt,name=statsEnabled,proto3" json:"statsEnabled,omitempty"`
}

func (*SchedulerToQuerier) Descriptor

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

func (*SchedulerToQuerier) Equal

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

func (*SchedulerToQuerier) GetFrontendAddress

func (m *SchedulerToQuerier) GetFrontendAddress() string

func (*SchedulerToQuerier) GetHttpRequest

func (m *SchedulerToQuerier) GetHttpRequest() *httpgrpc.HTTPRequest

func (*SchedulerToQuerier) GetQueryID

func (m *SchedulerToQuerier) GetQueryID() uint64

func (*SchedulerToQuerier) GetStatsEnabled added in v1.7.0

func (m *SchedulerToQuerier) GetStatsEnabled() bool

func (*SchedulerToQuerier) GetUserID

func (m *SchedulerToQuerier) GetUserID() string

func (*SchedulerToQuerier) GoString

func (this *SchedulerToQuerier) GoString() string

func (*SchedulerToQuerier) Marshal

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

func (*SchedulerToQuerier) MarshalTo

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

func (*SchedulerToQuerier) MarshalToSizedBuffer

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

func (*SchedulerToQuerier) ProtoMessage

func (*SchedulerToQuerier) ProtoMessage()

func (*SchedulerToQuerier) Reset

func (m *SchedulerToQuerier) Reset()

func (*SchedulerToQuerier) Size

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

func (*SchedulerToQuerier) String

func (this *SchedulerToQuerier) String() string

func (*SchedulerToQuerier) Unmarshal

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

func (*SchedulerToQuerier) XXX_DiscardUnknown

func (m *SchedulerToQuerier) XXX_DiscardUnknown()

func (*SchedulerToQuerier) XXX_Marshal

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

func (*SchedulerToQuerier) XXX_Merge

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

func (*SchedulerToQuerier) XXX_Size

func (m *SchedulerToQuerier) XXX_Size() int

func (*SchedulerToQuerier) XXX_Unmarshal

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

type UnimplementedSchedulerForFrontendServer

type UnimplementedSchedulerForFrontendServer struct {
}

UnimplementedSchedulerForFrontendServer can be embedded to have forward compatible implementations.

func (*UnimplementedSchedulerForFrontendServer) FrontendLoop

type UnimplementedSchedulerForQuerierServer

type UnimplementedSchedulerForQuerierServer struct {
}

UnimplementedSchedulerForQuerierServer can be embedded to have forward compatible implementations.

func (*UnimplementedSchedulerForQuerierServer) QuerierLoop

Jump to

Keyboard shortcuts

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