Documentation
¶
Index ¶
- Variables
- type Controller
- type ControllerOptions
- type Options
- type Server
- func (s *Server) DeleteByMetadata(ctx context.Context, req *schedulerv1pb.DeleteByMetadataRequest) (*schedulerv1pb.DeleteByMetadataResponse, error)
- func (s *Server) DeleteByNamePrefix(ctx context.Context, req *schedulerv1pb.DeleteByNamePrefixRequest) (*schedulerv1pb.DeleteByNamePrefixResponse, error)
- func (s *Server) DeleteJob(ctx context.Context, req *schedulerv1pb.DeleteJobRequest) (*schedulerv1pb.DeleteJobResponse, error)
- func (s *Server) GetJob(ctx context.Context, req *schedulerv1pb.GetJobRequest) (*schedulerv1pb.GetJobResponse, error)
- func (s *Server) ListJobs(ctx context.Context, req *schedulerv1pb.ListJobsRequest) (*schedulerv1pb.ListJobsResponse, error)
- func (s *Server) ReportActorTypes(stream schedulerv1pb.Scheduler_ReportActorTypesServer) error
- func (s *Server) Run(ctx context.Context) error
- func (s *Server) ScheduleJob(ctx context.Context, req *schedulerv1pb.ScheduleJobRequest) (*schedulerv1pb.ScheduleJobResponse, error)
- func (s *Server) WatchHosts(_ *schedulerv1pb.WatchHostsRequest, ...) error
- func (s *Server) WatchJobs(stream schedulerv1pb.Scheduler_WatchJobsServer) error
Constants ¶
This section is empty.
Variables ¶
var ErrListen = errors.New("could not listen")
ErrListen is returned by Run when the server cannot bind its port. The default port lies inside the default ephemeral port range, so one of the process's own outbound connections can hold it; a new process gets new sockets.
Functions ¶
This section is empty.
Types ¶
type Controller ¶ added in v1.18.0
type Controller = controller.Controller
Controller is a long-lived k8s controller that must only be created once per process because controller-runtime registers controller names globally in the metrics registry.
func NewController ¶ added in v1.18.0
func NewController(opts ControllerOptions) (*Controller, error)
type ControllerOptions ¶ added in v1.18.0
type ControllerOptions = controller.Options
Controller is a long-lived k8s controller that must only be created once per process because controller-runtime registers controller names globally in the metrics registry.
type Options ¶
type Options struct {
Healthz healthz.Healthz
Security security.Handler
ListenAddress string
OverrideBroadcastHostPort *string
Port int
Mode modes.DaprMode
KubeConfig *string
Controller *controller.Controller
Workers uint32
Backend *string
BackendConfig any
PlacementEnabled bool
PlacementDisseminateTimeout time.Duration
PlacementDisseminateCoalesceWindow time.Duration
EtcdEmbed bool
EtcdDataDir string
EtcdName string
EtcdInitialCluster []string
EtcdClientPort uint64
EtcdClientListenAddress string
EtcdSpaceQuota int64
EtcdCompactionMode string
EtcdCompactionRetention string
EtcdSnapshotCount uint64
EtcdMaxSnapshots uint
EtcdMaxWALs uint
EtcdBackendBatchLimit int
EtcdBackendBatchInterval string
EtcdMaxTxnOps uint
EtcdDefragThresholdMB uint
EtcdInitialElectionTickAdvance bool
EtcdMetrics string
EtcdClientEndpoints []string
EtcdClientUsername string
EtcdClientPassword string
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the gRPC server for the Scheduler service.
func (*Server) DeleteByMetadata ¶ added in v1.17.0
func (s *Server) DeleteByMetadata(ctx context.Context, req *schedulerv1pb.DeleteByMetadataRequest) (*schedulerv1pb.DeleteByMetadataResponse, error)
DeleteByMetadata deletes all jobs matching the provided metadata.
func (*Server) DeleteByNamePrefix ¶ added in v1.17.0
func (s *Server) DeleteByNamePrefix(ctx context.Context, req *schedulerv1pb.DeleteByNamePrefixRequest) (*schedulerv1pb.DeleteByNamePrefixResponse, error)
DeleteByNamePrefix deletes all jobs matching the provided name prefix.
func (*Server) DeleteJob ¶
func (s *Server) DeleteJob(ctx context.Context, req *schedulerv1pb.DeleteJobRequest) (*schedulerv1pb.DeleteJobResponse, error)
func (*Server) GetJob ¶
func (s *Server) GetJob(ctx context.Context, req *schedulerv1pb.GetJobRequest) (*schedulerv1pb.GetJobResponse, error)
func (*Server) ListJobs ¶ added in v1.15.0
func (s *Server) ListJobs(ctx context.Context, req *schedulerv1pb.ListJobsRequest) (*schedulerv1pb.ListJobsResponse, error)
func (*Server) ReportActorTypes ¶ added in v1.19.0
func (s *Server) ReportActorTypes(stream schedulerv1pb.Scheduler_ReportActorTypesServer) error
ReportActorTypes serves per-actor-type placement orders to sidecars. Only available when this scheduler serves placement and is the current placement leader.
func (*Server) ScheduleJob ¶
func (s *Server) ScheduleJob(ctx context.Context, req *schedulerv1pb.ScheduleJobRequest) (*schedulerv1pb.ScheduleJobResponse, error)
func (*Server) WatchHosts ¶ added in v1.15.0
func (s *Server) WatchHosts(_ *schedulerv1pb.WatchHostsRequest, stream schedulerv1pb.Scheduler_WatchHostsServer) error
WatchHosts sends the current set of hosts in the scheduler cluster, and updates the sidecars upon changes.
func (*Server) WatchJobs ¶
func (s *Server) WatchJobs(stream schedulerv1pb.Scheduler_WatchJobsServer) error
WatchJobs sends jobs to Dapr sidecars upon component changes.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
handoff
Package handoff tracks the facts deciding the actor placement authority handoff, all derived from live observation so they rebuild whenever the observers do:
|
Package handoff tracks the facts deciding the actor placement authority handoff, all derived from live observation so they rebuild whenever the observers do: |
|
placement
Package placement implements the actor placement service inside the scheduler.
|
Package placement implements the actor placement service inside the scheduler. |
|
placement/loops/connections
Package connections is the per namespace placement controller.
|
Package connections is the per namespace placement controller. |
|
placement/loops/namespaces
Package namespaces is the top level placement controller, scoping streams and placement state by namespace.
|
Package namespaces is the top level placement controller, scoping streams and placement state by namespace. |
|
placement/loops/store
Package store holds the in-memory placement membership of a single namespace: which stream hosts which actor types.
|
Package store holds the in-memory placement membership of a single namespace: which stream hosts which actor types. |
|
placement/loops/stream
Package stream handles a single ReportActorTypes stream: sending placement orders and receiving host reports and acks.
|
Package stream handles a single ReportActorTypes stream: sending placement orders and receiving host reports and acks. |
|
placement/loops/timeout
Package timeout schedules dissemination round timeouts, keyed by round seq.
|
Package timeout schedules dissemination round timeouts, keyed by round seq. |