grpc_from0

package
v0.0.0-...-a81d9d3 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2021 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Overview

Package grpc_from0 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_make_interface_dump_proto protoreflect.FileDescriptor

Functions

func RegisterMakeInterfaceDumpHandler

func RegisterMakeInterfaceDumpHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterMakeInterfaceDumpHandler registers the http handlers for service MakeInterfaceDump to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterMakeInterfaceDumpHandlerClient

func RegisterMakeInterfaceDumpHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MakeInterfaceDumpClient) error

RegisterMakeInterfaceDumpHandlerClient registers the http handlers for service MakeInterfaceDump to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MakeInterfaceDumpClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MakeInterfaceDumpClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MakeInterfaceDumpClient" to call the correct interceptors.

func RegisterMakeInterfaceDumpHandlerFromEndpoint

func RegisterMakeInterfaceDumpHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterMakeInterfaceDumpHandlerFromEndpoint is same as RegisterMakeInterfaceDumpHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterMakeInterfaceDumpHandlerServer

func RegisterMakeInterfaceDumpHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MakeInterfaceDumpServer) error

RegisterMakeInterfaceDumpHandlerServer registers the http handlers for service MakeInterfaceDump to "mux". UnaryRPC :call MakeInterfaceDumpServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMakeInterfaceDumpHandlerFromEndpoint instead.

func RegisterMakeInterfaceDumpServer

func RegisterMakeInterfaceDumpServer(s *grpc.Server, srv MakeInterfaceDumpServer)

Types

type Dump

type Dump struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*Dump) Descriptor deprecated

func (*Dump) Descriptor() ([]byte, []int)

Deprecated: Use Dump.ProtoReflect.Descriptor instead.

func (*Dump) GetId

func (x *Dump) GetId() string

func (*Dump) ProtoMessage

func (*Dump) ProtoMessage()

func (*Dump) ProtoReflect

func (x *Dump) ProtoReflect() protoreflect.Message

func (*Dump) Reset

func (x *Dump) Reset()

func (*Dump) String

func (x *Dump) String() string

type MakeInterfaceDumpClient

type MakeInterfaceDumpClient interface {
	MakeInterfaceDump(ctx context.Context, in *MakeInterfaceDumpRequest, opts ...grpc.CallOption) (*Dump, error)
}

MakeInterfaceDumpClient is the client API for MakeInterfaceDump service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type MakeInterfaceDumpRequest

type MakeInterfaceDumpRequest struct {
	Id      string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name    string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Mac     string `protobuf:"bytes,3,opt,name=mac,proto3" json:"mac,omitempty"`
	Ip      string `protobuf:"bytes,4,opt,name=ip,proto3" json:"ip,omitempty"`
	Dns     string `protobuf:"bytes,5,opt,name=dns,proto3" json:"dns,omitempty"`
	Gateway string `protobuf:"bytes,6,opt,name=gateway,proto3" json:"gateway,omitempty"`
	// contains filtered or unexported fields
}

func (*MakeInterfaceDumpRequest) Descriptor deprecated

func (*MakeInterfaceDumpRequest) Descriptor() ([]byte, []int)

Deprecated: Use MakeInterfaceDumpRequest.ProtoReflect.Descriptor instead.

func (*MakeInterfaceDumpRequest) GetDns

func (x *MakeInterfaceDumpRequest) GetDns() string

func (*MakeInterfaceDumpRequest) GetGateway

func (x *MakeInterfaceDumpRequest) GetGateway() string

func (*MakeInterfaceDumpRequest) GetId

func (x *MakeInterfaceDumpRequest) GetId() string

func (*MakeInterfaceDumpRequest) GetIp

func (x *MakeInterfaceDumpRequest) GetIp() string

func (*MakeInterfaceDumpRequest) GetMac

func (x *MakeInterfaceDumpRequest) GetMac() string

func (*MakeInterfaceDumpRequest) GetName

func (x *MakeInterfaceDumpRequest) GetName() string

func (*MakeInterfaceDumpRequest) ProtoMessage

func (*MakeInterfaceDumpRequest) ProtoMessage()

func (*MakeInterfaceDumpRequest) ProtoReflect

func (x *MakeInterfaceDumpRequest) ProtoReflect() protoreflect.Message

func (*MakeInterfaceDumpRequest) Reset

func (x *MakeInterfaceDumpRequest) Reset()

func (*MakeInterfaceDumpRequest) String

func (x *MakeInterfaceDumpRequest) String() string

type MakeInterfaceDumpServer

type MakeInterfaceDumpServer interface {
	MakeInterfaceDump(context.Context, *MakeInterfaceDumpRequest) (*Dump, error)
}

MakeInterfaceDumpServer is the server API for MakeInterfaceDump service.

type UnimplementedMakeInterfaceDumpServer

type UnimplementedMakeInterfaceDumpServer struct {
}

UnimplementedMakeInterfaceDumpServer can be embedded to have forward compatible implementations.

func (*UnimplementedMakeInterfaceDumpServer) MakeInterfaceDump

Jump to

Keyboard shortcuts

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