gez

package module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2022 License: Unlicense Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Respond

func Respond(w http.ResponseWriter, r *Response)

func RespondWithStatus added in v0.0.2

func RespondWithStatus(w http.ResponseWriter, s *status.Status)

func WithIgnoreServicesWithStreamError

func WithIgnoreServicesWithStreamError() optFn

func WithInterceptor

func WithInterceptor(i grpc.UnaryServerInterceptor) optFn

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(client *http.Client, endpoint string) *Client

func (*Client) Invoke

func (c *Client) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...grpc.CallOption) error

func (*Client) NewStream

func (c *Client) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error)

type Request

type Request struct {
	Method string          `json:"method,omitempty"`
	Data   json.RawMessage `json:"data,omitempty"`
}

type Response

type Response struct {
	Data   json.RawMessage `json:"data,omitempty"`
	Status json.RawMessage `json:"status,omitempty"`
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(optFns ...optFn) *Server

func (*Server) Handle

func (s *Server) Handle(w http.ResponseWriter, r *http.Request)

func (*Server) RegisterService

func (s *Server) RegisterService(sd *grpc.ServiceDesc, ss interface{})

Directories

Path Synopsis
cmd
gez
proto

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL