Documentation
¶
Index ¶
- type Option
- func WithClientEndpoints(endpoints ...string) Option
- func WithClientPassword(password string) Option
- func WithClientUsername(username string) Option
- func WithDataDir(dataDir string) Option
- func WithEmbed(embed bool) Option
- func WithEtcdClientPort(port int) Option
- func WithEtcdSpaceQuota(quota string) Option
- func WithExecOptions(execOptions ...exec.Option) Option
- func WithExit1() Option
- func WithHealthzPort(port int) Option
- func WithID(id string) Option
- func WithInitialCluster(initialCluster string) Option
- func WithKubeconfig(kubeconfig string) Option
- func WithLogLevel(level string) Option
- func WithLogLineStderr(ll *logline.LogLine) Option
- func WithLogLineStdout(ll *logline.LogLine) Option
- func WithMetricsPort(port int) Option
- func WithMode(mode string) Option
- func WithNamespace(namespace string) Option
- func WithOverrideBroadcastHostPort(address string) Option
- func WithPort(port int) Option
- func WithSentry(sentry *sentry.Sentry) Option
- func WithWorkers(workers *uint32) Option
- type Scheduler
- func (s *Scheduler) Address() string
- func (s *Scheduler) Cleanup(t *testing.T)
- func (s *Scheduler) Client(t *testing.T, ctx context.Context) schedulerv1pb.SchedulerClient
- func (s *Scheduler) ClientMTLS(t *testing.T, ctx context.Context, appID string) schedulerv1pb.SchedulerClient
- func (s *Scheduler) ClientMTLSNS(t *testing.T, ctx context.Context, ns, appID string) schedulerv1pb.SchedulerClient
- func (s *Scheduler) DataDir() string
- func (s *Scheduler) ETCDClient(t *testing.T, ctx context.Context) *clientv3.Client
- func (s *Scheduler) EtcdClientPort() int
- func (s *Scheduler) EtcdJobs(t *testing.T, ctx context.Context) []*mvccpb.KeyValue
- func (s *Scheduler) FillQuota(t *testing.T, ctx context.Context, prefix string)
- func (s *Scheduler) HealthzPort() int
- func (s *Scheduler) ID() string
- func (s *Scheduler) InitialCluster() string
- func (s *Scheduler) JobNowActor(name, namespace, appID, actorType, actorID string) *schedulerv1pb.ScheduleJobRequest
- func (s *Scheduler) JobNowJob(name, namespace, appID string) *schedulerv1pb.ScheduleJobRequest
- func (s *Scheduler) Kill(t *testing.T)
- func (s *Scheduler) ListAllKeys(t *testing.T, ctx context.Context, prefix string) []string
- func (s *Scheduler) ListJobActors(t *testing.T, ctx context.Context, namespace, appID, actorType, actorID string) *schedulerv1pb.ListJobsResponse
- func (s *Scheduler) ListJobJobs(t *testing.T, ctx context.Context, namespace, appID string) *schedulerv1pb.ListJobsResponse
- func (s *Scheduler) Metrics(t assert.TestingT, ctx context.Context) *metrics.Metrics
- func (s *Scheduler) MetricsAddress() string
- func (s *Scheduler) MetricsPort() int
- func (s *Scheduler) MetricsWithLabels(t *testing.T, ctx context.Context) *metrics.MetricsWithLabels
- func (s *Scheduler) Port() int
- func (s *Scheduler) RecoverQuota(t *testing.T, ctx context.Context, prefix string)
- func (s *Scheduler) Restart(t *testing.T, ctx context.Context)
- func (s *Scheduler) Run(t *testing.T, ctx context.Context)
- func (s *Scheduler) WaitUntilLeadership(t *testing.T, ctx context.Context, leaders int)
- func (s *Scheduler) WaitUntilRunning(t *testing.T, ctx context.Context)
- func (s *Scheduler) WaitUntilSidecarsConnected(t *testing.T, ctx context.Context, want int)
- func (s *Scheduler) WatchJobs(t *testing.T, ctx context.Context, ...) <-chan string
- func (s *Scheduler) WatchJobsFailed(t *testing.T, ctx context.Context, ...) <-chan string
- func (s *Scheduler) WatchJobsSuccess(t *testing.T, ctx context.Context, ...) <-chan string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*options)
func WithClientEndpoints ¶ added in v1.16.0
func WithClientPassword ¶ added in v1.16.0
func WithClientUsername ¶ added in v1.16.0
func WithDataDir ¶
func WithEtcdClientPort ¶ added in v1.15.0
func WithEtcdSpaceQuota ¶
WithEtcdSpaceQuota sets the --etcd-space-quota flag. Accepts any value parsable by k8s resource.ParseQuantity (e.g. "16Mi", "1Gi"). Used by tests that need to exercise etcd quota-exceeded behaviour.
func WithExecOptions ¶
func WithHealthzPort ¶
func WithInitialCluster ¶
WithInitialCluster adds the initial etcd cluster peers. This should include http:// in the url.
func WithKubeconfig ¶ added in v1.15.0
func WithLogLevel ¶
func WithLogLineStderr ¶ added in v1.17.0
func WithLogLineStdout ¶ added in v1.16.0
func WithMetricsPort ¶
func WithNamespace ¶
func WithOverrideBroadcastHostPort ¶ added in v1.15.0
func WithSentry ¶
func WithWorkers ¶ added in v1.17.0
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func (*Scheduler) Client ¶
func (s *Scheduler) Client(t *testing.T, ctx context.Context) schedulerv1pb.SchedulerClient
func (*Scheduler) ClientMTLS ¶
func (s *Scheduler) ClientMTLS(t *testing.T, ctx context.Context, appID string) schedulerv1pb.SchedulerClient
func (*Scheduler) ClientMTLSNS ¶ added in v1.16.4
func (s *Scheduler) ClientMTLSNS(t *testing.T, ctx context.Context, ns, appID string) schedulerv1pb.SchedulerClient
func (*Scheduler) ETCDClient ¶ added in v1.15.0
func (*Scheduler) EtcdClientPort ¶
func (*Scheduler) FillQuota ¶
FillQuota writes 1MiB values under the given etcd key prefix until etcd returns "database space exceeded". Requires the scheduler to have been started with a low --etcd-space-quota (see WithEtcdSpaceQuota); without one, we would otherwise just keep writing against etcd's default 2GiB quota and eventually fill the backing disk.
func (*Scheduler) HealthzPort ¶
func (*Scheduler) InitialCluster ¶
func (*Scheduler) JobNowActor ¶ added in v1.15.0
func (s *Scheduler) JobNowActor(name, namespace, appID, actorType, actorID string) *schedulerv1pb.ScheduleJobRequest
func (*Scheduler) JobNowJob ¶ added in v1.15.0
func (s *Scheduler) JobNowJob(name, namespace, appID string) *schedulerv1pb.ScheduleJobRequest
func (*Scheduler) ListAllKeys ¶ added in v1.15.0
func (*Scheduler) ListJobActors ¶ added in v1.15.0
func (s *Scheduler) ListJobActors(t *testing.T, ctx context.Context, namespace, appID, actorType, actorID string) *schedulerv1pb.ListJobsResponse
func (*Scheduler) ListJobJobs ¶ added in v1.15.0
func (s *Scheduler) ListJobJobs(t *testing.T, ctx context.Context, namespace, appID string) *schedulerv1pb.ListJobsResponse
func (*Scheduler) Metrics ¶ added in v1.15.0
Metrics returns a subset of metrics scraped from the metrics endpoint
func (*Scheduler) MetricsAddress ¶ added in v1.15.0
func (*Scheduler) MetricsPort ¶
func (*Scheduler) MetricsWithLabels ¶ added in v1.16.0
func (*Scheduler) RecoverQuota ¶
RecoverQuota deletes keys under prefix, compacts revisions, defragments the backend, and disarms any etcd alarms so writes can resume. Each etcd operation is bounded by its own 5s timeout so a hung backend cannot stall the test until the suite-level deadline.
func (*Scheduler) WaitUntilLeadership ¶ added in v1.15.0
func (*Scheduler) WaitUntilRunning ¶
func (*Scheduler) WaitUntilSidecarsConnected ¶
WaitUntilSidecarsConnected blocks until the scheduler has exactly `want` sidecar stream connections and that count has remained stable across 20 consecutive polls (~1s). This catches the startup window where daprd's WatchHosts stream can trigger a short disconnect/reconnect cycle of all scheduler job streams, during which a newly-scheduled job can be delivered to streams that are about to disconnect as well as their replacements.
func (*Scheduler) WatchJobs ¶ added in v1.15.0
func (s *Scheduler) WatchJobs(t *testing.T, ctx context.Context, initial *schedulerv1pb.WatchJobsRequestInitial, respStatus *atomic.Value) <-chan string
func (*Scheduler) WatchJobsFailed ¶ added in v1.15.0
func (s *Scheduler) WatchJobsFailed(t *testing.T, ctx context.Context, initial *schedulerv1pb.WatchJobsRequestInitial) <-chan string
func (*Scheduler) WatchJobsSuccess ¶ added in v1.15.0
func (s *Scheduler) WatchJobsSuccess(t *testing.T, ctx context.Context, initial *schedulerv1pb.WatchJobsRequestInitial) <-chan string