Documentation
¶
Index ¶
- func PrefixFromMetadata(meta *schedulerv1pb.JobMetadata) (string, error)
- func PrefixesFromNamespace(namespace string) []string
- type Job
- type Options
- type Request
- type Serializer
- func (s *Serializer) FromRequest(ctx context.Context, req Request) (*Job, error)
- func (s *Serializer) FromWatch(stream schedulerv1pb.Scheduler_WatchJobsServer) (*schedulerv1pb.WatchJobsRequestInitial, error)
- func (s *Serializer) KeyFromMetadata(ctx context.Context, req *schedulerv1pb.JobMetadata, asPrefix bool) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrefixFromMetadata ¶ added in v1.16.17
func PrefixFromMetadata(meta *schedulerv1pb.JobMetadata) (string, error)
PrefixFromMetadata returns the job key prefix (including the trailing "||" delimiter) for a single stored job's metadata, without performing authorization. The full job key equals this prefix concatenated with the reminder/job name, so trimming this prefix from a key recovers that name. This is robust even when the actor type or id themselves contain "||", unlike re-splitting the key.
func PrefixesFromNamespace ¶
PrefixesFromNamespace returns key prefixes for all jobs types for a given namespace.
Types ¶
type Request ¶
type Request interface {
GetName() string
GetMetadata() *schedulerv1pb.JobMetadata
}
type Serializer ¶
type Serializer struct {
// contains filtered or unexported fields
}
func New ¶
func New(opts Options) *Serializer
func (*Serializer) FromRequest ¶
func (*Serializer) FromWatch ¶
func (s *Serializer) FromWatch(stream schedulerv1pb.Scheduler_WatchJobsServer) (*schedulerv1pb.WatchJobsRequestInitial, error)
func (*Serializer) KeyFromMetadata ¶ added in v1.17.0
func (s *Serializer) KeyFromMetadata(ctx context.Context, req *schedulerv1pb.JobMetadata, asPrefix bool) (string, error)
Click to show internal directories.
Click to hide internal directories.