serialize

package
v1.18.3 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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

func PrefixesFromNamespace(namespace string) []string

PrefixesFromNamespace returns key prefixes for all jobs types for a given namespace.

Types

type Job

type Job struct {
	// contains filtered or unexported fields
}

func (*Job) Metadata

func (j *Job) Metadata() *anypb.Any

func (*Job) Name

func (j *Job) Name() string

type Options

type Options struct {
	Security security.Handler
}

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 (s *Serializer) FromRequest(ctx context.Context, req Request) (*Job, error)

func (*Serializer) KeyFromMetadata added in v1.17.0

func (s *Serializer) KeyFromMetadata(ctx context.Context, req *schedulerv1pb.JobMetadata, asPrefix bool) (string, error)

Jump to

Keyboard shortcuts

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