Documentation ¶
Overview ¶
Package grpc_from0 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterGetInterfaceDumpsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterGetInterfaceDumpsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GetInterfaceDumpsClient) error
- func RegisterGetInterfaceDumpsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterGetInterfaceDumpsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GetInterfaceDumpsServer) error
- func RegisterGetInterfaceDumpsServer(s *grpc.Server, srv GetInterfaceDumpsServer)
- type Dump
- func (*Dump) Descriptor() ([]byte, []int)deprecated
- func (x *Dump) GetDns() string
- func (x *Dump) GetGateway() string
- func (x *Dump) GetId() string
- func (x *Dump) GetIp() string
- func (x *Dump) GetMac() string
- func (x *Dump) GetName() string
- func (*Dump) ProtoMessage()
- func (x *Dump) ProtoReflect() protoreflect.Message
- func (x *Dump) Reset()
- func (x *Dump) String() string
- type Dumps
- type GetInterfaceDumpsClient
- type GetInterfaceDumpsRequest
- func (*GetInterfaceDumpsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetInterfaceDumpsRequest) GetLastCount() int32
- func (*GetInterfaceDumpsRequest) ProtoMessage()
- func (x *GetInterfaceDumpsRequest) ProtoReflect() protoreflect.Message
- func (x *GetInterfaceDumpsRequest) Reset()
- func (x *GetInterfaceDumpsRequest) String() string
- type GetInterfaceDumpsServer
- type UnimplementedGetInterfaceDumpsServer
Constants ¶
This section is empty.
Variables ¶
var File_get_interface_dumps_proto protoreflect.FileDescriptor
Functions ¶
func RegisterGetInterfaceDumpsHandler ¶
func RegisterGetInterfaceDumpsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterGetInterfaceDumpsHandler registers the http handlers for service GetInterfaceDumps to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterGetInterfaceDumpsHandlerClient ¶
func RegisterGetInterfaceDumpsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GetInterfaceDumpsClient) error
RegisterGetInterfaceDumpsHandlerClient registers the http handlers for service GetInterfaceDumps to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "GetInterfaceDumpsClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GetInterfaceDumpsClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "GetInterfaceDumpsClient" to call the correct interceptors.
func RegisterGetInterfaceDumpsHandlerFromEndpoint ¶
func RegisterGetInterfaceDumpsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterGetInterfaceDumpsHandlerFromEndpoint is same as RegisterGetInterfaceDumpsHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterGetInterfaceDumpsHandlerServer ¶
func RegisterGetInterfaceDumpsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GetInterfaceDumpsServer) error
RegisterGetInterfaceDumpsHandlerServer registers the http handlers for service GetInterfaceDumps to "mux". UnaryRPC :call GetInterfaceDumpsServer 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 RegisterGetInterfaceDumpsHandlerFromEndpoint instead.
func RegisterGetInterfaceDumpsServer ¶
func RegisterGetInterfaceDumpsServer(s *grpc.Server, srv GetInterfaceDumpsServer)
Types ¶
type Dump ¶
type Dump 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 (*Dump) Descriptor
deprecated
func (*Dump) GetGateway ¶
func (*Dump) ProtoMessage ¶
func (*Dump) ProtoMessage()
func (*Dump) ProtoReflect ¶
func (x *Dump) ProtoReflect() protoreflect.Message
type Dumps ¶
type Dumps struct { Dumps []*Dump `protobuf:"bytes,1,rep,name=dumps,proto3" json:"dumps,omitempty"` // contains filtered or unexported fields }
func (*Dumps) Descriptor
deprecated
func (*Dumps) ProtoMessage ¶
func (*Dumps) ProtoMessage()
func (*Dumps) ProtoReflect ¶
func (x *Dumps) ProtoReflect() protoreflect.Message
type GetInterfaceDumpsClient ¶
type GetInterfaceDumpsClient interface {
GetInterfaceDumps(ctx context.Context, in *GetInterfaceDumpsRequest, opts ...grpc.CallOption) (*Dumps, error)
}
GetInterfaceDumpsClient is the client API for GetInterfaceDumps service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewGetInterfaceDumpsClient ¶
func NewGetInterfaceDumpsClient(cc grpc.ClientConnInterface) GetInterfaceDumpsClient
type GetInterfaceDumpsRequest ¶
type GetInterfaceDumpsRequest struct { LastCount int32 `protobuf:"varint,1,opt,name=last_count,json=lastCount,proto3" json:"last_count,omitempty"` // contains filtered or unexported fields }
func (*GetInterfaceDumpsRequest) Descriptor
deprecated
func (*GetInterfaceDumpsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetInterfaceDumpsRequest.ProtoReflect.Descriptor instead.
func (*GetInterfaceDumpsRequest) GetLastCount ¶
func (x *GetInterfaceDumpsRequest) GetLastCount() int32
func (*GetInterfaceDumpsRequest) ProtoMessage ¶
func (*GetInterfaceDumpsRequest) ProtoMessage()
func (*GetInterfaceDumpsRequest) ProtoReflect ¶
func (x *GetInterfaceDumpsRequest) ProtoReflect() protoreflect.Message
func (*GetInterfaceDumpsRequest) Reset ¶
func (x *GetInterfaceDumpsRequest) Reset()
func (*GetInterfaceDumpsRequest) String ¶
func (x *GetInterfaceDumpsRequest) String() string
type GetInterfaceDumpsServer ¶
type GetInterfaceDumpsServer interface {
GetInterfaceDumps(context.Context, *GetInterfaceDumpsRequest) (*Dumps, error)
}
GetInterfaceDumpsServer is the server API for GetInterfaceDumps service.
type UnimplementedGetInterfaceDumpsServer ¶
type UnimplementedGetInterfaceDumpsServer struct { }
UnimplementedGetInterfaceDumpsServer can be embedded to have forward compatible implementations.
func (*UnimplementedGetInterfaceDumpsServer) GetInterfaceDumps ¶
func (*UnimplementedGetInterfaceDumpsServer) GetInterfaceDumps(context.Context, *GetInterfaceDumpsRequest) (*Dumps, error)