Documentation ¶
Index ¶
- func RegisterAppServer(s *grpc.Server, srv AppServer)
- func RegisterExposedAppServer(s *grpc.Server, srv ExposedAppServer)
- type AppClient
- type AppServer
- type ExposedAppClient
- type ExposedAppServer
- type FibonacciRequest
- func (*FibonacciRequest) Descriptor() ([]byte, []int)
- func (m *FibonacciRequest) GetN() uint64
- func (*FibonacciRequest) ProtoMessage()
- func (m *FibonacciRequest) Reset()
- func (m *FibonacciRequest) String() string
- func (m *FibonacciRequest) XXX_DiscardUnknown()
- func (m *FibonacciRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FibonacciRequest) XXX_Merge(src proto.Message)
- func (m *FibonacciRequest) XXX_Size() int
- func (m *FibonacciRequest) XXX_Unmarshal(b []byte) error
- type FibonacciResponse
- func (*FibonacciResponse) Descriptor() ([]byte, []int)
- func (m *FibonacciResponse) GetNumber() uint64
- func (*FibonacciResponse) ProtoMessage()
- func (m *FibonacciResponse) Reset()
- func (m *FibonacciResponse) String() string
- func (m *FibonacciResponse) XXX_DiscardUnknown()
- func (m *FibonacciResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FibonacciResponse) XXX_Merge(src proto.Message)
- func (m *FibonacciResponse) XXX_Size() int
- func (m *FibonacciResponse) XXX_Unmarshal(b []byte) error
- type Handle
- func (h *Handle) Fibonacci(ctx context.Context, in *FibonacciRequest) (*FibonacciResponse, error)
- func (h *Handle) MakeClientConn() (*grpc.ClientConn, error)
- func (h *Handle) Random(ctx context.Context, in *RandomRequest) (*RandomResponse, error)
- func (h *Handle) Start() error
- func (h *Handle) Stop()
- func (h *Handle) UploadPhoto(ctx context.Context, in *UploadPhotoRequest) (*UploadPhotoResponse, error)
- type RandomRequest
- func (*RandomRequest) Descriptor() ([]byte, []int)
- func (m *RandomRequest) GetLowerBound() int64
- func (m *RandomRequest) GetUpperBound() int64
- func (*RandomRequest) ProtoMessage()
- func (m *RandomRequest) Reset()
- func (m *RandomRequest) String() string
- func (m *RandomRequest) XXX_DiscardUnknown()
- func (m *RandomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RandomRequest) XXX_Merge(src proto.Message)
- func (m *RandomRequest) XXX_Size() int
- func (m *RandomRequest) XXX_Unmarshal(b []byte) error
- type RandomResponse
- func (*RandomResponse) Descriptor() ([]byte, []int)
- func (m *RandomResponse) GetNumber() int64
- func (*RandomResponse) ProtoMessage()
- func (m *RandomResponse) Reset()
- func (m *RandomResponse) String() string
- func (m *RandomResponse) XXX_DiscardUnknown()
- func (m *RandomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RandomResponse) XXX_Merge(src proto.Message)
- func (m *RandomResponse) XXX_Size() int
- func (m *RandomResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedAppServer
- func (*UnimplementedAppServer) Fibonacci(ctx context.Context, req *FibonacciRequest) (*FibonacciResponse, error)
- func (*UnimplementedAppServer) Random(ctx context.Context, req *RandomRequest) (*RandomResponse, error)
- func (*UnimplementedAppServer) UploadPhoto(ctx context.Context, req *UploadPhotoRequest) (*UploadPhotoResponse, error)
- type UnimplementedExposedAppServer
- type UploadPhotoRequest
- func (*UploadPhotoRequest) Descriptor() ([]byte, []int)
- func (m *UploadPhotoRequest) GetData() []byte
- func (*UploadPhotoRequest) ProtoMessage()
- func (m *UploadPhotoRequest) Reset()
- func (m *UploadPhotoRequest) String() string
- func (m *UploadPhotoRequest) XXX_DiscardUnknown()
- func (m *UploadPhotoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UploadPhotoRequest) XXX_Merge(src proto.Message)
- func (m *UploadPhotoRequest) XXX_Size() int
- func (m *UploadPhotoRequest) XXX_Unmarshal(b []byte) error
- type UploadPhotoResponse
- func (*UploadPhotoResponse) Descriptor() ([]byte, []int)
- func (m *UploadPhotoResponse) GetUuid() string
- func (*UploadPhotoResponse) ProtoMessage()
- func (m *UploadPhotoResponse) Reset()
- func (m *UploadPhotoResponse) String() string
- func (m *UploadPhotoResponse) XXX_DiscardUnknown()
- func (m *UploadPhotoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UploadPhotoResponse) XXX_Merge(src proto.Message)
- func (m *UploadPhotoResponse) XXX_Size() int
- func (m *UploadPhotoResponse) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAppServer ¶ added in v0.3.0
func RegisterExposedAppServer ¶ added in v0.3.0
func RegisterExposedAppServer(s *grpc.Server, srv ExposedAppServer)
Types ¶
type AppClient ¶ added in v0.3.0
type AppClient interface { // Fibonacci returns the nth number in the Fibonacci sequence. It does not start with an HTTP method and is therefore not exposed Fibonacci(ctx context.Context, in *FibonacciRequest, opts ...grpc.CallOption) (*FibonacciResponse, error) // Random returns a random integer in the desired range. It may be accessed via a Get request to the proxy at, for example, /api/Service/Random Random(ctx context.Context, in *RandomRequest, opts ...grpc.CallOption) (*RandomResponse, error) // UploadPhoto allows the upload of a photo to some persistence store. It may be accessed via Post request to the proxy at, for example, /api/Service/UploadPhoto UploadPhoto(ctx context.Context, in *UploadPhotoRequest, opts ...grpc.CallOption) (*UploadPhotoResponse, error) }
AppClient is the client API for App service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAppClient ¶ added in v0.3.0
func NewAppClient(cc *grpc.ClientConn) AppClient
type AppServer ¶ added in v0.3.0
type AppServer interface { // Fibonacci returns the nth number in the Fibonacci sequence. It does not start with an HTTP method and is therefore not exposed Fibonacci(context.Context, *FibonacciRequest) (*FibonacciResponse, error) // Random returns a random integer in the desired range. It may be accessed via a Get request to the proxy at, for example, /api/Service/Random Random(context.Context, *RandomRequest) (*RandomResponse, error) // UploadPhoto allows the upload of a photo to some persistence store. It may be accessed via Post request to the proxy at, for example, /api/Service/UploadPhoto UploadPhoto(context.Context, *UploadPhotoRequest) (*UploadPhotoResponse, error) }
AppServer is the server API for App service.
type ExposedAppClient ¶ added in v0.3.0
type ExposedAppClient interface { GetRandom(ctx context.Context, in *RandomRequest, opts ...grpc.CallOption) (*RandomResponse, error) PostUploadPhoto(ctx context.Context, in *UploadPhotoRequest, opts ...grpc.CallOption) (*UploadPhotoResponse, error) }
ExposedAppClient is the client API for ExposedApp service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewExposedAppClient ¶ added in v0.3.0
func NewExposedAppClient(cc *grpc.ClientConn) ExposedAppClient
type ExposedAppServer ¶ added in v0.3.0
type ExposedAppServer interface { GetRandom(context.Context, *RandomRequest) (*RandomResponse, error) PostUploadPhoto(context.Context, *UploadPhotoRequest) (*UploadPhotoResponse, error) }
ExposedAppServer is the server API for ExposedApp service.
type FibonacciRequest ¶
type FibonacciRequest struct { // The 1-indexed point in the Fibonacci sequence N uint64 `protobuf:"varint,1,opt,name=n,proto3" json:"n,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*FibonacciRequest) Descriptor ¶
func (*FibonacciRequest) Descriptor() ([]byte, []int)
func (*FibonacciRequest) GetN ¶
func (m *FibonacciRequest) GetN() uint64
func (*FibonacciRequest) ProtoMessage ¶
func (*FibonacciRequest) ProtoMessage()
func (*FibonacciRequest) Reset ¶
func (m *FibonacciRequest) Reset()
func (*FibonacciRequest) String ¶
func (m *FibonacciRequest) String() string
func (*FibonacciRequest) XXX_DiscardUnknown ¶
func (m *FibonacciRequest) XXX_DiscardUnknown()
func (*FibonacciRequest) XXX_Marshal ¶
func (m *FibonacciRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FibonacciRequest) XXX_Merge ¶
func (m *FibonacciRequest) XXX_Merge(src proto.Message)
func (*FibonacciRequest) XXX_Size ¶
func (m *FibonacciRequest) XXX_Size() int
func (*FibonacciRequest) XXX_Unmarshal ¶
func (m *FibonacciRequest) XXX_Unmarshal(b []byte) error
type FibonacciResponse ¶
type FibonacciResponse struct { // The number found in the nth place of the sequence Number uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*FibonacciResponse) Descriptor ¶
func (*FibonacciResponse) Descriptor() ([]byte, []int)
func (*FibonacciResponse) GetNumber ¶
func (m *FibonacciResponse) GetNumber() uint64
func (*FibonacciResponse) ProtoMessage ¶
func (*FibonacciResponse) ProtoMessage()
func (*FibonacciResponse) Reset ¶
func (m *FibonacciResponse) Reset()
func (*FibonacciResponse) String ¶
func (m *FibonacciResponse) String() string
func (*FibonacciResponse) XXX_DiscardUnknown ¶
func (m *FibonacciResponse) XXX_DiscardUnknown()
func (*FibonacciResponse) XXX_Marshal ¶
func (m *FibonacciResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FibonacciResponse) XXX_Merge ¶
func (m *FibonacciResponse) XXX_Merge(src proto.Message)
func (*FibonacciResponse) XXX_Size ¶
func (m *FibonacciResponse) XXX_Size() int
func (*FibonacciResponse) XXX_Unmarshal ¶
func (m *FibonacciResponse) XXX_Unmarshal(b []byte) error
type Handle ¶
type Handle struct {
// contains filtered or unexported fields
}
Handle is an example GRPC server for a microservice
func (*Handle) Fibonacci ¶
func (h *Handle) Fibonacci(ctx context.Context, in *FibonacciRequest) (*FibonacciResponse, error)
Fibonacci returns the nth number in the Fibonacci sequence. It does not start with an HTTP method and is therefore not exposed
func (*Handle) MakeClientConn ¶
func (h *Handle) MakeClientConn() (*grpc.ClientConn, error)
MakeClientConn returns a client connection to this service
func (*Handle) Random ¶
func (h *Handle) Random(ctx context.Context, in *RandomRequest) (*RandomResponse, error)
Random returns a random integer in the desired range. It may be accessed via a Get request to the proxy at, for example, /api/Service/Random
func (*Handle) UploadPhoto ¶
func (h *Handle) UploadPhoto(ctx context.Context, in *UploadPhotoRequest) (*UploadPhotoResponse, error)
UploadPhoto allows the upload of a photo to some persistence store. It may be accessed via Post request to the proxy at, for example, /api/Service/UploadPhoto
type RandomRequest ¶
type RandomRequest struct { // The lowest inclusive integer for the resulting random number LowerBound int64 `protobuf:"varint,1,opt,name=lower_bound,json=lowerBound,proto3" json:"lower_bound,omitempty"` // The highest inclusive integer for the resulting random number UpperBound int64 `protobuf:"varint,2,opt,name=upper_bound,json=upperBound,proto3" json:"upper_bound,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RandomRequest) Descriptor ¶
func (*RandomRequest) Descriptor() ([]byte, []int)
func (*RandomRequest) GetLowerBound ¶
func (m *RandomRequest) GetLowerBound() int64
func (*RandomRequest) GetUpperBound ¶
func (m *RandomRequest) GetUpperBound() int64
func (*RandomRequest) ProtoMessage ¶
func (*RandomRequest) ProtoMessage()
func (*RandomRequest) Reset ¶
func (m *RandomRequest) Reset()
func (*RandomRequest) String ¶
func (m *RandomRequest) String() string
func (*RandomRequest) XXX_DiscardUnknown ¶
func (m *RandomRequest) XXX_DiscardUnknown()
func (*RandomRequest) XXX_Marshal ¶
func (m *RandomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RandomRequest) XXX_Merge ¶
func (m *RandomRequest) XXX_Merge(src proto.Message)
func (*RandomRequest) XXX_Size ¶
func (m *RandomRequest) XXX_Size() int
func (*RandomRequest) XXX_Unmarshal ¶
func (m *RandomRequest) XXX_Unmarshal(b []byte) error
type RandomResponse ¶
type RandomResponse struct { // The generated number Number int64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RandomResponse) Descriptor ¶
func (*RandomResponse) Descriptor() ([]byte, []int)
func (*RandomResponse) GetNumber ¶
func (m *RandomResponse) GetNumber() int64
func (*RandomResponse) ProtoMessage ¶
func (*RandomResponse) ProtoMessage()
func (*RandomResponse) Reset ¶
func (m *RandomResponse) Reset()
func (*RandomResponse) String ¶
func (m *RandomResponse) String() string
func (*RandomResponse) XXX_DiscardUnknown ¶
func (m *RandomResponse) XXX_DiscardUnknown()
func (*RandomResponse) XXX_Marshal ¶
func (m *RandomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RandomResponse) XXX_Merge ¶
func (m *RandomResponse) XXX_Merge(src proto.Message)
func (*RandomResponse) XXX_Size ¶
func (m *RandomResponse) XXX_Size() int
func (*RandomResponse) XXX_Unmarshal ¶
func (m *RandomResponse) XXX_Unmarshal(b []byte) error
type UnimplementedAppServer ¶ added in v0.3.0
type UnimplementedAppServer struct { }
UnimplementedAppServer can be embedded to have forward compatible implementations.
func (*UnimplementedAppServer) Fibonacci ¶ added in v0.3.0
func (*UnimplementedAppServer) Fibonacci(ctx context.Context, req *FibonacciRequest) (*FibonacciResponse, error)
func (*UnimplementedAppServer) Random ¶ added in v0.3.0
func (*UnimplementedAppServer) Random(ctx context.Context, req *RandomRequest) (*RandomResponse, error)
func (*UnimplementedAppServer) UploadPhoto ¶ added in v0.3.0
func (*UnimplementedAppServer) UploadPhoto(ctx context.Context, req *UploadPhotoRequest) (*UploadPhotoResponse, error)
type UnimplementedExposedAppServer ¶ added in v0.3.0
type UnimplementedExposedAppServer struct { }
UnimplementedExposedAppServer can be embedded to have forward compatible implementations.
func (*UnimplementedExposedAppServer) GetRandom ¶ added in v0.3.0
func (*UnimplementedExposedAppServer) GetRandom(ctx context.Context, req *RandomRequest) (*RandomResponse, error)
func (*UnimplementedExposedAppServer) PostUploadPhoto ¶ added in v0.3.0
func (*UnimplementedExposedAppServer) PostUploadPhoto(ctx context.Context, req *UploadPhotoRequest) (*UploadPhotoResponse, error)
type UploadPhotoRequest ¶
type UploadPhotoRequest struct { // The raw bytes of the photo Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*UploadPhotoRequest) Descriptor ¶
func (*UploadPhotoRequest) Descriptor() ([]byte, []int)
func (*UploadPhotoRequest) GetData ¶
func (m *UploadPhotoRequest) GetData() []byte
func (*UploadPhotoRequest) ProtoMessage ¶
func (*UploadPhotoRequest) ProtoMessage()
func (*UploadPhotoRequest) Reset ¶
func (m *UploadPhotoRequest) Reset()
func (*UploadPhotoRequest) String ¶
func (m *UploadPhotoRequest) String() string
func (*UploadPhotoRequest) XXX_DiscardUnknown ¶
func (m *UploadPhotoRequest) XXX_DiscardUnknown()
func (*UploadPhotoRequest) XXX_Marshal ¶
func (m *UploadPhotoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UploadPhotoRequest) XXX_Merge ¶
func (m *UploadPhotoRequest) XXX_Merge(src proto.Message)
func (*UploadPhotoRequest) XXX_Size ¶
func (m *UploadPhotoRequest) XXX_Size() int
func (*UploadPhotoRequest) XXX_Unmarshal ¶
func (m *UploadPhotoRequest) XXX_Unmarshal(b []byte) error
type UploadPhotoResponse ¶
type UploadPhotoResponse struct { // The uuid generated to identify and retreive this photo Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*UploadPhotoResponse) Descriptor ¶
func (*UploadPhotoResponse) Descriptor() ([]byte, []int)
func (*UploadPhotoResponse) GetUuid ¶
func (m *UploadPhotoResponse) GetUuid() string
func (*UploadPhotoResponse) ProtoMessage ¶
func (*UploadPhotoResponse) ProtoMessage()
func (*UploadPhotoResponse) Reset ¶
func (m *UploadPhotoResponse) Reset()
func (*UploadPhotoResponse) String ¶
func (m *UploadPhotoResponse) String() string
func (*UploadPhotoResponse) XXX_DiscardUnknown ¶
func (m *UploadPhotoResponse) XXX_DiscardUnknown()
func (*UploadPhotoResponse) XXX_Marshal ¶
func (m *UploadPhotoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UploadPhotoResponse) XXX_Merge ¶
func (m *UploadPhotoResponse) XXX_Merge(src proto.Message)
func (*UploadPhotoResponse) XXX_Size ¶
func (m *UploadPhotoResponse) XXX_Size() int
func (*UploadPhotoResponse) XXX_Unmarshal ¶
func (m *UploadPhotoResponse) XXX_Unmarshal(b []byte) error