forked from yarpc/yarpc-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.go
45 lines (37 loc) · 1.04 KB
/
server.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Code generated by thriftrw-plugin-yarpc
// @generated
package extendonlyserver
import (
"go.uber.org/yarpc/api/transport"
"go.uber.org/yarpc/encoding/thrift"
"go.uber.org/yarpc/encoding/thrift/thriftrw-plugin-yarpc/internal/tests/common/baseserviceserver"
)
// Interface is the server-side interface for the ExtendOnly service.
type Interface interface {
baseserviceserver.Interface
}
// New prepares an implementation of the ExtendOnly service for
// registration.
//
// handler := ExtendOnlyHandler{}
// dispatcher.Register(extendonlyserver.New(handler))
func New(impl Interface, opts ...thrift.RegisterOption) []transport.Procedure {
service := thrift.Service{
Name: "ExtendOnly",
Methods: []thrift.Method{},
}
procedures := make([]transport.Procedure, 0, 0)
procedures = append(
procedures,
baseserviceserver.New(
impl,
append(
opts,
thrift.Named("ExtendOnly"),
)...,
)...,
)
procedures = append(procedures, thrift.BuildProcedures(service, opts...)...)
return procedures
}
type handler struct{ impl Interface }