server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SidecarServer

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

SidecarServer is the gRPC server that listens on an endpoint where the CSI-Addons requests come in.

func NewSidecarServer

func NewSidecarServer(endpoint string) *SidecarServer

NewSidecarServer create a new SidecarServer on the given endpoint. The endpoint should be an ip address. Only tcp ports are supported.

func (*SidecarServer) RegisterService

func (ss *SidecarServer) RegisterService(svc SidecarService)

RegisterService takes the SidecarService and registers it with the SidecarServer gRPC server. This function should be called before Start, where the services are registered on the internal gRPC server.

func (*SidecarServer) Start

func (ss *SidecarServer) Start()

Init creates the internal gRPC server, and registers the SidecarServices. and starts gRPC server.

func (*SidecarServer) Stop

func (ss *SidecarServer) Stop()

Stop can be used to stop the internal gRPC server.

type SidecarService

type SidecarService interface {
	// RegisterService is called by the SidecarServer to add a CSI-Addons
	// service that can handle requests.
	RegisterService(server grpc.ServiceRegistrar)
}

SidecarService is the interface that is required to be implemented so that the SidecarServer can register the service by calling RegisterService().

Jump to

Keyboard shortcuts

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