You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
2.3 KiB
Go
89 lines
2.3 KiB
Go
// Code generated by protoc-gen-micro. DO NOT EDIT.
|
|
// source: routerclientpb.proto
|
|
|
|
package routerclientpb
|
|
|
|
import (
|
|
fmt "fmt"
|
|
proto "google.golang.org/protobuf/proto"
|
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
|
math "math"
|
|
)
|
|
|
|
import (
|
|
context "context"
|
|
api "go-micro.dev/v4/api"
|
|
client "go-micro.dev/v4/client"
|
|
server "go-micro.dev/v4/server"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ api.Endpoint
|
|
var _ context.Context
|
|
var _ client.Option
|
|
var _ server.Option
|
|
|
|
// Api Endpoints for RouterClientService service
|
|
|
|
func NewRouterClientServiceEndpoints() []*api.Endpoint {
|
|
return []*api.Endpoint{}
|
|
}
|
|
|
|
// Client API for RouterClientService service
|
|
|
|
type RouterClientService interface {
|
|
Routes(ctx context.Context, in *emptypb.Empty, opts ...client.CallOption) (*RoutesReply, error)
|
|
}
|
|
|
|
type routerClientService struct {
|
|
c client.Client
|
|
name string
|
|
}
|
|
|
|
func NewRouterClientService(name string, c client.Client) RouterClientService {
|
|
return &routerClientService{
|
|
c: c,
|
|
name: name,
|
|
}
|
|
}
|
|
|
|
func (c *routerClientService) Routes(ctx context.Context, in *emptypb.Empty, opts ...client.CallOption) (*RoutesReply, error) {
|
|
req := c.c.NewRequest(c.name, "RouterClientService.Routes", in)
|
|
out := new(RoutesReply)
|
|
err := c.c.Call(ctx, req, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// Server API for RouterClientService service
|
|
|
|
type RouterClientServiceHandler interface {
|
|
Routes(context.Context, *emptypb.Empty, *RoutesReply) error
|
|
}
|
|
|
|
func RegisterRouterClientServiceHandler(s server.Server, hdlr RouterClientServiceHandler, opts ...server.HandlerOption) error {
|
|
type routerClientService interface {
|
|
Routes(ctx context.Context, in *emptypb.Empty, out *RoutesReply) error
|
|
}
|
|
type RouterClientService struct {
|
|
routerClientService
|
|
}
|
|
h := &routerClientServiceHandler{hdlr}
|
|
return s.Handle(s.NewHandler(&RouterClientService{h}, opts...))
|
|
}
|
|
|
|
type routerClientServiceHandler struct {
|
|
RouterClientServiceHandler
|
|
}
|
|
|
|
func (h *routerClientServiceHandler) Routes(ctx context.Context, in *emptypb.Empty, out *RoutesReply) error {
|
|
return h.RouterClientServiceHandler.Routes(ctx, in, out)
|
|
}
|