grpc

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datasource added in v0.8.3

type Datasource interface {
	FindMachineByID(machineID string) (*metal.Machine, error)
	UpdateMachine(old, new *metal.Machine) error
}

type Server added in v0.10.2

type Server struct {
	*WaitService
	*SupwdService
	// contains filtered or unexported fields
}

func NewServer added in v0.10.2

func NewServer(cfg *ServerConfig) (*Server, error)

func (*Server) Serve added in v0.10.2

func (s *Server) Serve() error

type ServerConfig added in v0.10.2

type ServerConfig struct {
	Publisher                bus.Publisher
	Datasource               Datasource
	Logger                   *zap.SugaredLogger
	NsqTlsConfig             *bus.TLSConfig
	NsqlookupdHttpAddress    string
	GrpcPort                 int
	TlsEnabled               bool
	CaCertFile               string
	ServerCertFile           string
	ServerKeyFile            string
	ResponseInterval         time.Duration
	CheckInterval            time.Duration
	BMCSuperUserPasswordFile string
}

type SupwdService added in v0.10.2

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

func NewSupwdService added in v0.10.2

func NewSupwdService(cfg *ServerConfig) *SupwdService

func (*SupwdService) FetchSuperUserPassword added in v0.10.2

func (s *SupwdService) FetchSuperUserPassword(ctx context.Context, req *v1.SuperUserPasswordRequest) (*v1.SuperUserPasswordResponse, error)

type WaitService added in v0.10.2

type WaitService struct {
	bus.Publisher

	Logger *zap.SugaredLogger
	// contains filtered or unexported fields
}

func NewWaitService added in v0.10.2

func NewWaitService(cfg *ServerConfig) (*WaitService, error)

func (*WaitService) NotifyAllocated added in v0.10.2

func (s *WaitService) NotifyAllocated(machineID string) error

func (*WaitService) Wait added in v0.10.2

func (s *WaitService) Wait(req *v1.WaitRequest, srv v1.Wait_WaitServer) error

Jump to

Keyboard shortcuts

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