grpc

package
v0.0.0-...-8f485f0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Overview

* Copyright 2017-present Open Networking Foundation

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at

* http://www.apache.org/licenses/LICENSE-2.0

* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* Copyright 2017-present Open Networking Foundation

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at

* http://www.apache.org/licenses/LICENSE-2.0

* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GrpcSecurity

type GrpcSecurity struct {
	KeyFile  string
	CertFile string
	CaFile   string
}

type GrpcServer

type GrpcServer struct {
	*GrpcSecurity
	// contains filtered or unexported fields
}

func NewGrpcServer

func NewGrpcServer(
	address string,
	port int32,
	certs *GrpcSecurity,
	secure bool,
) *GrpcServer

Instantiate a GRPC server data structure

func (*GrpcServer) AddBalService

func (s *GrpcServer) AddBalService()

AddBalService appends service request functions specific to BAL

func (*GrpcServer) AddCommonService

func (s *GrpcServer) AddCommonService(device core.PonSimInterface)

AddCommonService appends service request functions common to all PonSim devices

func (*GrpcServer) AddOltService

func (s *GrpcServer) AddOltService(device core.PonSimInterface)

AddOltService appends service request functions specific to OLT devices

func (*GrpcServer) AddPonSimService

func (s *GrpcServer) AddPonSimService(device core.PonSimInterface)

AddPonSimService appends service request functions for PonSim devices

func (*GrpcServer) AddService

func (s *GrpcServer) AddService(
	registerFunction func(*grpc.Server, interface{}),
	handler interface{},
)

AddService appends a generic service request function

func (*GrpcServer) AddXPonService

func (s *GrpcServer) AddXPonService()

AddXPonService appends service request functions specific to XPonSim

func (*GrpcServer) Start

func (s *GrpcServer) Start(ctx context.Context)

Start prepares the GRPC server and starts servicing requests

func (*GrpcServer) Stop

func (s *GrpcServer) Stop()

Stop servicing GRPC requests

Directories

Path Synopsis
* Copyright 2017-present Open Networking Foundation * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
* Copyright 2017-present Open Networking Foundation * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
* Copyright 2017-present Open Networking Foundation * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
* Copyright 2017-present Open Networking Foundation * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.

Jump to

Keyboard shortcuts

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