serialize

package
v0.0.0-...-949823d Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MetadataFromKey

func MetadataFromKey(key string) (*schedulerv1pb.JobMetadata, error)

MetadataFromKey returns the JobMetadata based on a raw job 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) PrefixFromList

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

Jump to

Keyboard shortcuts

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