1
0
mirror of https://github.com/taigrr/wasm-experiments synced 2025-01-18 04:03:21 -08:00

Use custom for of grpc-go and unify client and server

This commit is contained in:
Johan Brandhorst
2018-06-25 15:48:55 +01:00
parent 3d89b1de82
commit c7ec9fde8c
71 changed files with 2734 additions and 4250 deletions

View File

@@ -1,9 +1,37 @@
generate:
protoc -I. ./proto/web.proto \
--go_out=plugins=grpc:$$GOPATH/src \
--wasm_out=plugins=grpc:./
mv ./proto/web.wasm.pb.go ./proto/client/
--go_out=plugins=grpc:$$GOPATH/src
go generate -x ./frontend/
to_frontend:
cd ../../../../google.golang.org/grpc && \
mv -f parse_js.gox parse_js.go && \
mv -f parse.go parse.gox && \
mv -f newstream_js.gox newstream_js.go && \
mv -f newstream.go newstream.gox && \
mv -f dial_js.gox dial_js.go && \
mv -f dial.go dial.gox && \
mv -f transport/stream_js.gox transport/stream_js.go && \
mv -f transport/stream.go transport/stream.gox && \
mv -f transport/client_transport_js.gox transport/client_transport_js.go && \
mv -f transport/client_transport.go transport/client_transport.gox && \
mv -f transport/content_type_js.gox transport/content_type_js.go && \
mv -f transport/content_type.go transport/content_type.gox
to_backend:
cd ../../../../google.golang.org/grpc && \
mv -f parse_js.go parse_js.gox && \
mv -f parse.gox parse.go && \
mv -f newstream_js.go newstream_js.gox && \
mv -f newstream.gox newstream.go && \
mv -f dial_js.go dial_js.gox && \
mv -f dial.gox dial.go && \
mv -f transport/stream_js.go transport/stream_js.gox && \
mv -f transport/stream.gox transport/stream.go && \
mv -f transport/client_transport_js.go transport/client_transport_js.gox && \
mv -f transport/client_transport.gox transport/client_transport.go && \
mv -f transport/content_type_js.go transport/content_type_js.gox && \
mv -f transport/content_type.gox transport/content_type.go
serve:
go run main.go

View File

@@ -9,7 +9,7 @@ import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"github.com/johanbrandhorst/wasm-experiments/grpc/proto/server"
web "github.com/johanbrandhorst/wasm-experiments/grpc/proto"
)
// Backend should be used to implement the server interface
@@ -18,9 +18,9 @@ type Backend struct {
}
// Ensure struct implements interface
var _ server.BackendServer = (*Backend)(nil)
var _ web.BackendServer = (*Backend)(nil)
func (b Backend) GetUser(ctx context.Context, req *server.GetUserRequest) (*server.User, error) {
func (b Backend) GetUser(ctx context.Context, req *web.GetUserRequest) (*web.User, error) {
if req.GetUserId() != "1234" {
st := status.New(codes.InvalidArgument, "invalid id")
detSt, err := st.WithDetails(&errdetails.BadRequest{
@@ -36,14 +36,14 @@ func (b Backend) GetUser(ctx context.Context, req *server.GetUserRequest) (*serv
}
return nil, st.Err()
}
return &server.User{
return &web.User{
Id: req.GetUserId(),
}, nil
}
func (b Backend) GetUsers(req *server.GetUsersRequest, srv server.Backend_GetUsersServer) error {
func (b Backend) GetUsers(req *web.GetUsersRequest, srv web.Backend_GetUsersServer) error {
for index := 0; index < int(req.GetNumUsers()); index++ {
err := srv.Send(&server.User{
err := srv.Send(&web.User{
Id: strconv.Itoa(index),
})
if err != nil {

File diff suppressed because one or more lines are too long

View File

@@ -4,25 +4,36 @@ import (
"context"
"fmt"
"io"
"os"
_ "google.golang.org/genproto/googleapis/rpc/errdetails"
"google.golang.org/grpc"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/status"
grpc "github.com/johanbrandhorst/grpc-wasm"
server "github.com/johanbrandhorst/wasm-experiments/grpc/proto/client"
web "github.com/johanbrandhorst/wasm-experiments/grpc/proto"
)
// Build with Go WASM fork
//go:generate rm -f ./html/test.wasm
//go:generate bash -c "GOOS=js GOARCH=wasm GOROOT=$GOPATH/src/github.com/neelance/go/ $GOPATH/src/github.com/neelance/go/bin/go build -o ./html/test.wasm frontend.go"
//go:generate bash -c "GOOS=js GOARCH=wasm GOROOT=$GOPATH/src/github.com/johanbrandhorst/go/ $GOPATH/src/github.com/johanbrandhorst/go/bin/go build -o ./html/test.wasm frontend.go"
// Integrate generated JS into a Go file for static loading.
//go:generate bash -c "go run assets_generate.go"
func init() {
// Should only be done from init functions
grpclog.SetLoggerV2(grpclog.NewLoggerV2(os.Stdout, os.Stdout, os.Stdout))
}
func main() {
cc, _ := grpc.Dial("")
client := server.NewBackendClient(cc)
resp, err := client.GetUser(context.Background(), &server.GetUserRequest{
cc, err := grpc.Dial("")
if err != nil {
fmt.Println(err)
return
}
client := web.NewBackendClient(cc)
resp, err := client.GetUser(context.Background(), &web.GetUserRequest{
UserId: "1234",
})
if err != nil {
@@ -31,7 +42,7 @@ func main() {
} else {
fmt.Println(resp.GetId())
}
resp, err = client.GetUser(context.Background(), &server.GetUserRequest{
resp, err = client.GetUser(context.Background(), &web.GetUserRequest{
UserId: "123",
})
if err != nil {
@@ -41,7 +52,7 @@ func main() {
fmt.Println(resp.GetId())
}
srv, err := client.GetUsers(context.Background(), &server.GetUsersRequest{
srv, err := client.GetUsers(context.Background(), &web.GetUsersRequest{
NumUsers: 3,
})
if err != nil {

View File

@@ -41,6 +41,11 @@
}
return buf.length;
},
openSync(path, flags, mode) {
const err = new Error("not implemented");
err.code = "ENOSYS";
throw err;
},
};
}
@@ -369,6 +374,7 @@
return go.run(result.instance);
}).catch((err) => {
console.error(err);
go.exited = true;
process.exit(1);
});
}

View File

@@ -19,7 +19,7 @@ import (
"github.com/johanbrandhorst/wasm-experiments/grpc/backend"
"github.com/johanbrandhorst/wasm-experiments/grpc/frontend/bundle"
"github.com/johanbrandhorst/wasm-experiments/grpc/proto/server"
web "github.com/johanbrandhorst/wasm-experiments/grpc/proto"
)
var logger *logrus.Logger
@@ -39,7 +39,7 @@ func init() {
func main() {
gs := grpc.NewServer()
server.RegisterBackendServer(gs, &backend.Backend{})
web.RegisterBackendServer(gs, &backend.Backend{})
wrappedServer := grpcweb.WrapServer(gs, grpcweb.WithWebsockets(true))
handler := func(resp http.ResponseWriter, req *http.Request) {

View File

@@ -1,302 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: proto/web.proto
package server
/*
Web exposes a backend server over gRPC.
*/
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "github.com/johanbrandhorst/grpc-wasm"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type GetUserRequest struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetUserRequest) Reset() { *m = GetUserRequest{} }
func (m *GetUserRequest) String() string { return proto.CompactTextString(m) }
func (*GetUserRequest) ProtoMessage() {}
func (*GetUserRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_web_87670d45010119fa, []int{0}
}
func (m *GetUserRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserRequest.Unmarshal(m, b)
}
func (m *GetUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetUserRequest.Marshal(b, m, deterministic)
}
func (dst *GetUserRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetUserRequest.Merge(dst, src)
}
func (m *GetUserRequest) XXX_Size() int {
return xxx_messageInfo_GetUserRequest.Size(m)
}
func (m *GetUserRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetUserRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetUserRequest proto.InternalMessageInfo
func (m *GetUserRequest) GetUserId() string {
if m != nil {
return m.UserId
}
return ""
}
type User struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *User) Reset() { *m = User{} }
func (m *User) String() string { return proto.CompactTextString(m) }
func (*User) ProtoMessage() {}
func (*User) Descriptor() ([]byte, []int) {
return fileDescriptor_web_87670d45010119fa, []int{1}
}
func (m *User) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_User.Unmarshal(m, b)
}
func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_User.Marshal(b, m, deterministic)
}
func (dst *User) XXX_Merge(src proto.Message) {
xxx_messageInfo_User.Merge(dst, src)
}
func (m *User) XXX_Size() int {
return xxx_messageInfo_User.Size(m)
}
func (m *User) XXX_DiscardUnknown() {
xxx_messageInfo_User.DiscardUnknown(m)
}
var xxx_messageInfo_User proto.InternalMessageInfo
func (m *User) GetId() string {
if m != nil {
return m.Id
}
return ""
}
type GetUsersRequest struct {
NumUsers int64 `protobuf:"varint,1,opt,name=num_users,json=numUsers,proto3" json:"num_users,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetUsersRequest) Reset() { *m = GetUsersRequest{} }
func (m *GetUsersRequest) String() string { return proto.CompactTextString(m) }
func (*GetUsersRequest) ProtoMessage() {}
func (*GetUsersRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_web_87670d45010119fa, []int{2}
}
func (m *GetUsersRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUsersRequest.Unmarshal(m, b)
}
func (m *GetUsersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetUsersRequest.Marshal(b, m, deterministic)
}
func (dst *GetUsersRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetUsersRequest.Merge(dst, src)
}
func (m *GetUsersRequest) XXX_Size() int {
return xxx_messageInfo_GetUsersRequest.Size(m)
}
func (m *GetUsersRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetUsersRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetUsersRequest proto.InternalMessageInfo
func (m *GetUsersRequest) GetNumUsers() int64 {
if m != nil {
return m.NumUsers
}
return 0
}
func init() {
proto.RegisterType((*GetUserRequest)(nil), "web.GetUserRequest")
proto.RegisterType((*User)(nil), "web.User")
proto.RegisterType((*GetUsersRequest)(nil), "web.GetUsersRequest")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// BackendClient is the client API for Backend service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type BackendClient interface {
GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error)
GetUsers(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (Backend_GetUsersClient, error)
}
type backendClient struct {
cc *grpc.ClientConn
}
func NewBackendClient(cc *grpc.ClientConn) BackendClient {
return &backendClient{cc}
}
func (c *backendClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error) {
out := new(User)
err := c.cc.Invoke(ctx, "/web.Backend/GetUser", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *backendClient) GetUsers(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (Backend_GetUsersClient, error) {
stream, err := c.cc.NewStream(ctx, &_Backend_serviceDesc.Streams[0], "/web.Backend/GetUsers", opts...)
if err != nil {
return nil, err
}
x := &backendGetUsersClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type Backend_GetUsersClient interface {
Recv() (*User, error)
grpc.ClientStream
}
type backendGetUsersClient struct {
grpc.ClientStream
}
func (x *backendGetUsersClient) Recv() (*User, error) {
m := new(User)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// BackendServer is the server API for Backend service.
type BackendServer interface {
GetUser(context.Context, *GetUserRequest) (*User, error)
GetUsers(*GetUsersRequest, Backend_GetUsersServer) error
}
func RegisterBackendServer(s *grpc.Server, srv BackendServer) {
s.RegisterService(&_Backend_serviceDesc, srv)
}
func _Backend_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BackendServer).GetUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/web.Backend/GetUser",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BackendServer).GetUser(ctx, req.(*GetUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Backend_GetUsers_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(GetUsersRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(BackendServer).GetUsers(m, &backendGetUsersServer{stream})
}
type Backend_GetUsersServer interface {
Send(*User) error
grpc.ServerStream
}
type backendGetUsersServer struct {
grpc.ServerStream
}
func (x *backendGetUsersServer) Send(m *User) error {
return x.ServerStream.SendMsg(m)
}
var _Backend_serviceDesc = grpc.ServiceDesc{
ServiceName: "web.Backend",
HandlerType: (*BackendServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetUser",
Handler: _Backend_GetUser_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "GetUsers",
Handler: _Backend_GetUsers_Handler,
ServerStreams: true,
},
},
Metadata: "proto/web.proto",
}
func init() { proto.RegisterFile("proto/web.proto", fileDescriptor_web_87670d45010119fa) }
var fileDescriptor_web_87670d45010119fa = []byte{
// 236 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xc1, 0x4b, 0xc3, 0x30,
0x18, 0xc5, 0xdd, 0x26, 0xeb, 0xfa, 0x1d, 0x36, 0x88, 0xa2, 0xa2, 0x17, 0xe9, 0x49, 0x11, 0x1b,
0xd1, 0xb3, 0x08, 0xbb, 0x88, 0xd7, 0x82, 0x17, 0x2f, 0xa3, 0x69, 0x3e, 0xda, 0x2a, 0x49, 0xea,
0xf7, 0x25, 0xd6, 0x3f, 0x5f, 0x12, 0x37, 0x51, 0xf0, 0x96, 0xf7, 0xf2, 0x7b, 0x2f, 0x8f, 0xc0,
0x6a, 0x20, 0xe7, 0x9d, 0x1c, 0x51, 0x95, 0xe9, 0x24, 0x66, 0x23, 0xaa, 0xe2, 0x12, 0x96, 0x8f,
0xe8, 0x9f, 0x19, 0xa9, 0xc2, 0xf7, 0x80, 0xec, 0xc5, 0x31, 0x64, 0x81, 0x91, 0x36, 0xbd, 0x3e,
0x99, 0x9c, 0x4f, 0x2e, 0xf2, 0x6a, 0x1e, 0xe5, 0x93, 0x2e, 0x8e, 0x60, 0x3f, 0x72, 0x62, 0x09,
0xd3, 0x9f, 0xbb, 0x69, 0xaf, 0x8b, 0x12, 0x56, 0xdb, 0x0a, 0xde, 0x75, 0x9c, 0x41, 0x6e, 0x83,
0xd9, 0xc4, 0x20, 0x27, 0x72, 0x56, 0x2d, 0x6c, 0x30, 0x89, 0xb9, 0x6d, 0x21, 0x5b, 0xd7, 0xcd,
0x1b, 0x5a, 0x2d, 0xae, 0x20, 0xdb, 0x46, 0xc5, 0x41, 0x19, 0x97, 0xfd, 0xdd, 0x72, 0x9a, 0x27,
0x33, 0x3a, 0xc5, 0x9e, 0x90, 0xb0, 0xd8, 0xbd, 0x23, 0x0e, 0x7f, 0xd3, 0xfc, 0x1f, 0x7e, 0x33,
0x59, 0x3f, 0xbc, 0xdc, 0xb7, 0xbd, 0xef, 0x82, 0x2a, 0x1b, 0x67, 0xe4, 0xab, 0xeb, 0x6a, 0xab,
0xa8, 0xb6, 0xba, 0x73, 0xc4, 0x5e, 0x8e, 0x35, 0x9b, 0x6b, 0xfc, 0x1c, 0x90, 0x7a, 0x83, 0xd6,
0xb3, 0x6c, 0x69, 0x68, 0xe4, 0xf7, 0x27, 0x31, 0xd2, 0x07, 0x92, 0x9a, 0x27, 0x75, 0xf7, 0x15,
0x00, 0x00, 0xff, 0xff, 0x75, 0x28, 0x26, 0x8f, 0x3b, 0x01, 0x00, 0x00,
}

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: proto/web.proto
package server // import "github.com/johanbrandhorst/wasm-experiments/grpc/proto/server"
package web // import "github.com/johanbrandhorst/wasm-experiments/grpc/proto"
/*
Web exposes a backend server over gRPC.
@@ -38,7 +38,7 @@ func (m *GetUserRequest) Reset() { *m = GetUserRequest{} }
func (m *GetUserRequest) String() string { return proto.CompactTextString(m) }
func (*GetUserRequest) ProtoMessage() {}
func (*GetUserRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_web_87670d45010119fa, []int{0}
return fileDescriptor_web_fab68bbab7573337, []int{0}
}
func (m *GetUserRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUserRequest.Unmarshal(m, b)
@@ -76,7 +76,7 @@ func (m *User) Reset() { *m = User{} }
func (m *User) String() string { return proto.CompactTextString(m) }
func (*User) ProtoMessage() {}
func (*User) Descriptor() ([]byte, []int) {
return fileDescriptor_web_87670d45010119fa, []int{1}
return fileDescriptor_web_fab68bbab7573337, []int{1}
}
func (m *User) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_User.Unmarshal(m, b)
@@ -114,7 +114,7 @@ func (m *GetUsersRequest) Reset() { *m = GetUsersRequest{} }
func (m *GetUsersRequest) String() string { return proto.CompactTextString(m) }
func (*GetUsersRequest) ProtoMessage() {}
func (*GetUsersRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_web_87670d45010119fa, []int{2}
return fileDescriptor_web_fab68bbab7573337, []int{2}
}
func (m *GetUsersRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetUsersRequest.Unmarshal(m, b)
@@ -280,23 +280,23 @@ var _Backend_serviceDesc = grpc.ServiceDesc{
Metadata: "proto/web.proto",
}
func init() { proto.RegisterFile("proto/web.proto", fileDescriptor_web_87670d45010119fa) }
func init() { proto.RegisterFile("proto/web.proto", fileDescriptor_web_fab68bbab7573337) }
var fileDescriptor_web_87670d45010119fa = []byte{
// 236 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xc1, 0x4b, 0xc3, 0x30,
0x18, 0xc5, 0xdd, 0x26, 0xeb, 0xfa, 0x1d, 0x36, 0x88, 0xa2, 0xa2, 0x17, 0xe9, 0x49, 0x11, 0x1b,
0xd1, 0xb3, 0x08, 0xbb, 0x88, 0xd7, 0x82, 0x17, 0x2f, 0xa3, 0x69, 0x3e, 0xda, 0x2a, 0x49, 0xea,
0xf7, 0x25, 0xd6, 0x3f, 0x5f, 0x12, 0x37, 0x51, 0xf0, 0x96, 0xf7, 0xf2, 0x7b, 0x2f, 0x8f, 0xc0,
0x6a, 0x20, 0xe7, 0x9d, 0x1c, 0x51, 0x95, 0xe9, 0x24, 0x66, 0x23, 0xaa, 0xe2, 0x12, 0x96, 0x8f,
0xe8, 0x9f, 0x19, 0xa9, 0xc2, 0xf7, 0x80, 0xec, 0xc5, 0x31, 0x64, 0x81, 0x91, 0x36, 0xbd, 0x3e,
0x99, 0x9c, 0x4f, 0x2e, 0xf2, 0x6a, 0x1e, 0xe5, 0x93, 0x2e, 0x8e, 0x60, 0x3f, 0x72, 0x62, 0x09,
0xd3, 0x9f, 0xbb, 0x69, 0xaf, 0x8b, 0x12, 0x56, 0xdb, 0x0a, 0xde, 0x75, 0x9c, 0x41, 0x6e, 0x83,
0xd9, 0xc4, 0x20, 0x27, 0x72, 0x56, 0x2d, 0x6c, 0x30, 0x89, 0xb9, 0x6d, 0x21, 0x5b, 0xd7, 0xcd,
0x1b, 0x5a, 0x2d, 0xae, 0x20, 0xdb, 0x46, 0xc5, 0x41, 0x19, 0x97, 0xfd, 0xdd, 0x72, 0x9a, 0x27,
0x33, 0x3a, 0xc5, 0x9e, 0x90, 0xb0, 0xd8, 0xbd, 0x23, 0x0e, 0x7f, 0xd3, 0xfc, 0x1f, 0x7e, 0x33,
0x59, 0x3f, 0xbc, 0xdc, 0xb7, 0xbd, 0xef, 0x82, 0x2a, 0x1b, 0x67, 0xe4, 0xab, 0xeb, 0x6a, 0xab,
0xa8, 0xb6, 0xba, 0x73, 0xc4, 0x5e, 0x8e, 0x35, 0x9b, 0x6b, 0xfc, 0x1c, 0x90, 0x7a, 0x83, 0xd6,
0xb3, 0x6c, 0x69, 0x68, 0xe4, 0xf7, 0x27, 0x31, 0xd2, 0x07, 0x92, 0x9a, 0x27, 0x75, 0xf7, 0x15,
0x00, 0x00, 0xff, 0xff, 0x75, 0x28, 0x26, 0x8f, 0x3b, 0x01, 0x00, 0x00,
var fileDescriptor_web_fab68bbab7573337 = []byte{
// 235 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xb1, 0x4b, 0xc4, 0x30,
0x18, 0xc5, 0xed, 0x9d, 0x5c, 0xaf, 0xdf, 0x70, 0x07, 0x51, 0x54, 0x74, 0x91, 0x4e, 0x8a, 0xd8,
0x88, 0x6e, 0xea, 0x74, 0x8b, 0xb8, 0x16, 0x5c, 0x5c, 0x8e, 0xa6, 0xf9, 0x68, 0xab, 0x24, 0xa9,
0xf9, 0x12, 0xe2, 0x9f, 0x2f, 0x09, 0x57, 0x51, 0xb8, 0xed, 0xe5, 0xe5, 0xf7, 0x5e, 0x1e, 0x81,
0xf5, 0x68, 0x8d, 0x33, 0x3c, 0xa0, 0xa8, 0x92, 0x62, 0xf3, 0x80, 0xa2, 0xbc, 0x86, 0xd5, 0x0b,
0xba, 0x37, 0x42, 0x5b, 0xe3, 0x97, 0x47, 0x72, 0xec, 0x14, 0x72, 0x4f, 0x68, 0xb7, 0x83, 0x3c,
0xcb, 0x2e, 0xb3, 0xab, 0xa2, 0x5e, 0xc4, 0xe3, 0xab, 0x2c, 0x4f, 0xe0, 0x30, 0x72, 0x6c, 0x05,
0xb3, 0xdf, 0xbb, 0xd9, 0x20, 0xcb, 0x0a, 0xd6, 0xbb, 0x0a, 0x9a, 0x3a, 0x2e, 0xa0, 0xd0, 0x5e,
0x6d, 0x63, 0x90, 0x12, 0x39, 0xaf, 0x97, 0xda, 0xab, 0xc4, 0xdc, 0x77, 0x90, 0x6f, 0x9a, 0xf6,
0x13, 0xb5, 0x64, 0x37, 0x90, 0xef, 0xa2, 0xec, 0xa8, 0x8a, 0xcb, 0xfe, 0x6f, 0x39, 0x2f, 0x92,
0x19, 0x9d, 0xf2, 0x80, 0x71, 0x58, 0x4e, 0xef, 0xb0, 0xe3, 0xbf, 0x34, 0xed, 0xc3, 0xef, 0xb2,
0xcd, 0xf3, 0xfb, 0x63, 0x37, 0xb8, 0xde, 0x8b, 0xaa, 0x35, 0x8a, 0x7f, 0x98, 0xbe, 0xd1, 0xc2,
0x36, 0x5a, 0xf6, 0xc6, 0x92, 0xe3, 0xa1, 0x21, 0x75, 0x8b, 0xdf, 0x23, 0xda, 0x41, 0xa1, 0x76,
0xc4, 0x3b, 0x3b, 0xb6, 0x3c, 0x7d, 0xcd, 0x53, 0x40, 0x21, 0x16, 0x49, 0x3e, 0xfc, 0x04, 0x00,
0x00, 0xff, 0xff, 0xaf, 0xf7, 0xf4, 0x4f, 0x38, 0x01, 0x00, 0x00,
}

View File

@@ -3,7 +3,7 @@ syntax = "proto3";
// Web exposes a backend server over gRPC.
package web;
option go_package = "github.com/johanbrandhorst/wasm-experiments/grpc/proto/server";
option go_package = "github.com/johanbrandhorst/wasm-experiments/grpc/proto;web";
// Backend defines the interface exposed by the backend.
service Backend {