service

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	Router *mux.Router

	Metrics ServiceMetrics
	// contains filtered or unexported fields
}

func NewService

func NewService() *Service

func (*Service) CreateTrainingJob

func (s *Service) CreateTrainingJob(data []byte) (string, error)

CreateTrainingJob

  1. Validate job spec
  2. Get or create base job info by job category
  3. Pre-process job spec
  4. Create training job 4.1. Insert job info to db 4.2. Insert job metadata to db
  5. Publish msg to mq, which is meant to be subscribed by the scheduler

func (*Service) DeleteTrainingJob

func (s *Service) DeleteTrainingJob(jobName string) error

DeleteTrainingJob 1. Delete job metadata from db 2. Publish msg to mq, which is meant to be subscribed by the scheduler

type ServiceMetrics added in v0.2.2

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

Jump to

Keyboard shortcuts

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