server

package
v0.67.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultK8sJobClient added in v0.2.0

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

DefaultK8sJobClient is a client for Kubernetes Job resources.

func NewK8sJobClient added in v0.2.0

func NewK8sJobClient(client kubernetes.Interface, jobNamespace string) *DefaultK8sJobClient

NewK8sJobClient creates a new K8sJobClient.

func (*DefaultK8sJobClient) CancelJob added in v0.2.0

func (c *DefaultK8sJobClient) CancelJob(ctx context.Context, jobID string) error

CancelJob cancels a job.

type S

type S struct {
	v1.UnimplementedFineTuningServiceServer
	// contains filtered or unexported fields
}

S is a server.

func New

func New(
	store *store.S,
	fileGetClient fileGetClient,
	modelClient modelClient,
	k8sJobClient k8sJobClient,
) *S

New creates a server.

func (*S) CancelJob

func (s *S) CancelJob(
	ctx context.Context,
	req *v1.CancelJobRequest,
) (*v1.Job, error)

CancelJob cancels a job.

func (*S) CreateJob

func (s *S) CreateJob(
	ctx context.Context,
	req *v1.CreateJobRequest,
) (*v1.Job, error)

CreateJob creates a new job.

func (*S) ListJobs

func (s *S) ListJobs(
	ctx context.Context,
	req *v1.ListJobsRequest,
) (*v1.ListJobsResponse, error)

ListJobs lists all jobs.

func (*S) Run

func (s *S) Run(ctx context.Context, port int, authConfig config.AuthConfig) error

Run starts the gRPC server.

func (*S) Stop

func (s *S) Stop()

Stop stops the gRPC server.

Jump to

Keyboard shortcuts

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