forked from usnistgov/ndn-dpdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgql.go
31 lines (27 loc) · 860 Bytes
/
gql.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
package socketface
import (
"github.com/graphql-go/graphql"
"github.com/usnistgov/ndn-dpdk/core/gqlserver"
"github.com/usnistgov/ndn-dpdk/iface"
)
// GraphQL types.
var (
GqlRxConnsType *graphql.Object
GqlRxEpollType *graphql.Object
)
func init() {
ocRxConns := graphql.ObjectConfig{
Name: "SocketRxConns",
Fields: iface.GqlRxGroupInterface.CopyFieldsTo(nil),
}
iface.GqlRxGroupInterface.AppendTo(&ocRxConns)
GqlRxConnsType = graphql.NewObject(ocRxConns)
gqlserver.ImplementsInterface[*rxConns](GqlRxConnsType, iface.GqlRxGroupInterface)
ocRxEpoll := graphql.ObjectConfig{
Name: "SocketRxEpoll",
Fields: iface.GqlRxGroupInterface.CopyFieldsTo(nil),
}
iface.GqlRxGroupInterface.AppendTo(&ocRxEpoll)
GqlRxEpollType = graphql.NewObject(ocRxEpoll)
gqlserver.ImplementsInterface[*rxEpoll](GqlRxEpollType, iface.GqlRxGroupInterface)
}