Versions in this module Expand all Collapse all v1 v1.1.0 Nov 28, 2018 Changes in this version type GRPCClient + func (c *GRPCClient) Close() error v1.0.1 Mar 30, 2018 Changes in this version + func NewGetHTTPHandle(factory func(echo.Context) (interface{}, error), ...) func(echo.Context) error + func NewJSONBodyHTTPHandle(factory func() interface{}, handler func(interface{}) (*JSONResult, error)) func(echo.Context) error + func ReadJSONFromBody(ctx echo.Context, value interface{}) error + type API struct + HTTP APIEntrypoint + Name string + type APIEntrypoint struct + DELETE string + GET string + POST string + PUT string + type ClientCreator func(string, *grpc.ClientConn) interface + type ClientOption func(*clientOptions) + func WithDirectAddresses(addrs ...string) ClientOption + func WithEtcdServiceDiscovery(prefix string, client *clientv3.Client) ClientOption + func WithTimeout(timeout time.Duration) ClientOption + type GRPCClient struct + func NewGRPCClient(creator ClientCreator, opts ...ClientOption) *GRPCClient + func (c *GRPCClient) GetServiceClient(name string) (interface{}, error) + type GRPCServer struct + func NewGRPCServer(addr string, register ServiceRegister, opts ...ServerOption) *GRPCServer + func (s *GRPCServer) GracefulStop() + func (s *GRPCServer) Start() error + type JSONResult struct + Code int + Data interface{} + type Publisher interface + Publish func(service string, meta naming.Update) error + type ServerOption func(*serverOptions) + func WithEtcdPublisher(client *clientv3.Client, prefix string, ttl int64, timeout time.Duration) ServerOption + func WithHTTPServer(addr string, httpSetup func(*echo.Echo)) ServerOption + type Service struct + Metadata interface{} + Name string + func NewService(name string, metadata interface{}, opts ...ServiceOption) Service + type ServiceOption func(*serviceOptions) + type ServiceRegister func(*grpc.Server) []Service