server

package
v2.0.0-...-07333c2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Name string
	// Client certificate as Base64 encoded DER format.
	CertificateString string
	// contains filtered or unexported fields
}

func (*Client) GetInfo

func (c *Client) GetInfo(client *rpc2.Client, req proto.GetInfoReq, resp *proto.GetInfoResp) error

GetInfo implements proto.ClientService

func (*Client) GetWorkers

func (c *Client) GetWorkers(client *rpc2.Client, req proto.GetWorkersReq, resp *proto.GetWorkersResp) error

GetWorkers implements proto.ClientService

func (*Client) Ping

func (c *Client) Ping(client *rpc2.Client, req proto.PingReq, resp *proto.PingResp) error

Ping implements proto.ClientService

func (*Client) SendMessage

func (c *Client) SendMessage(client *rpc2.Client, req proto.SendMessageReq, resp *proto.SendMessageResp) error

SendMessage implements proto.ClientService

type Server

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

func NewServer

func NewServer(addr string, certFile string, keyFile string) *Server

func (*Server) AddClient

func (s *Server) AddClient(client Client) error

func (*Server) Listen

func (s *Server) Listen() error

type Worker

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

func (*Worker) Hello

func (w *Worker) Hello(client *rpc2.Client, req proto.HelloReq, resp *proto.HelloResp) error

Hello implements proto.ControlService

func (*Worker) Ping

func (w *Worker) Ping(client *rpc2.Client, req proto.PingReq, resp *proto.PingResp) error

Ping implements proto.ControlService

Jump to

Keyboard shortcuts

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