server

package
v0.0.0-...-39e769a Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorJobNotFound    = status.Error(codes.NotFound, "Job not found")
	ErrorInternalServer = status.Error(codes.Internal, "Internal server error")
)

Functions

This section is empty.

Types

type Authorizer

type Authorizer interface {
	Authorize(subject, object, action string) error
}

type Config

type Config struct {
	Address string
	Service servicepb.ServiceServer
	TLS     *tls.Config
}

type Server

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

func New

func New(config Config, opts ...grpc.ServerOption) (*Server, error)

func (*Server) Address

func (s *Server) Address() string

func (*Server) Serve

func (s *Server) Serve() error

func (*Server) Stop

func (s *Server) Stop()

type Service

type Service struct {
	servicepb.UnimplementedServiceServer
	// contains filtered or unexported fields
}

func NewService

func NewService(logDir string, aclModelFile string, aclPolicyFile string) *Service

func (*Service) FollowLogs

func (*Service) Query

func (*Service) Start

func (*Service) Stop

type Worker

type Worker interface {
	StartJob(worker.Command) (*worker.Job, error)
	StopJob(string) error
	QueryJob(string) (worker.JobStatus, error)
	FollowLogs(string) (<-chan string, worker.CancelFunc, error)
}

Jump to

Keyboard shortcuts

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