transport

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 5 Imported by: 7

Documentation

Overview

Package transport contains base service desc interfaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompoundServiceDesc

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

CompoundServiceDesc combines several ServiceDesc.

func NewCompoundServiceDesc

func NewCompoundServiceDesc(desc ...ServiceDesc) *CompoundServiceDesc

NewCompoundServiceDesc returns new CompoundServiceDesc.

func (*CompoundServiceDesc) RegisterGRPC

func (d *CompoundServiceDesc) RegisterGRPC(g *grpc.Server)

RegisterGRPC register compounded services descs in current grpc server.

func (*CompoundServiceDesc) RegisterHTTP

func (d *CompoundServiceDesc) RegisterHTTP(mux *runtime.ServeMux)

RegisterHTTP register compounded services descs in current http router.

func (*CompoundServiceDesc) SwaggerDef

func (d *CompoundServiceDesc) SwaggerDef() []byte

SwaggerDef returns combines swagger definitions.

type Service

type Service interface {
	GetDescription() ServiceDesc
}

Service is a registerable collection of endpoints. These functions should be autogenerated by protoc-gen-tron.

type ServiceDesc

type ServiceDesc interface {
	RegisterGRPC(server *grpc.Server)
	RegisterHTTP(mux *runtime.ServeMux)
	SwaggerDef() []byte
}

ServiceDesc is a description of an endpoints' collection. These functions should be autogenerated by protoc-gen-tron.

Jump to

Keyboard shortcuts

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