go_micro_api

package
v2.9.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApiEndpoints added in v2.5.0

func NewApiEndpoints() []*api.Endpoint

func RegisterApiHandler

func RegisterApiHandler(s server.Server, hdlr ApiHandler, opts ...server.HandlerOption) error

func RegisterApiServer

func RegisterApiServer(s *grpc.Server, srv ApiServer)

Types

type ApiClient

type ApiClient interface {
	Register(ctx context.Context, in *Endpoint, opts ...grpc.CallOption) (*EmptyResponse, error)
	Deregister(ctx context.Context, in *Endpoint, opts ...grpc.CallOption) (*EmptyResponse, error)
}

ApiClient is the client API for Api service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewApiClient

func NewApiClient(cc *grpc.ClientConn) ApiClient

type ApiHandler

type ApiHandler interface {
	Register(context.Context, *Endpoint, *EmptyResponse) error
	Deregister(context.Context, *Endpoint, *EmptyResponse) error
}

type ApiServer

type ApiServer interface {
	Register(context.Context, *Endpoint) (*EmptyResponse, error)
	Deregister(context.Context, *Endpoint) (*EmptyResponse, error)
}

ApiServer is the server API for Api service.

type ApiService

type ApiService interface {
	Register(ctx context.Context, in *Endpoint, opts ...client.CallOption) (*EmptyResponse, error)
	Deregister(ctx context.Context, in *Endpoint, opts ...client.CallOption) (*EmptyResponse, error)
}

func NewApiService

func NewApiService(name string, c client.Client) ApiService

type EmptyResponse

type EmptyResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*EmptyResponse) Descriptor

func (*EmptyResponse) Descriptor() ([]byte, []int)

func (*EmptyResponse) ProtoMessage

func (*EmptyResponse) ProtoMessage()

func (*EmptyResponse) Reset

func (m *EmptyResponse) Reset()

func (*EmptyResponse) String

func (m *EmptyResponse) String() string

func (*EmptyResponse) XXX_DiscardUnknown

func (m *EmptyResponse) XXX_DiscardUnknown()

func (*EmptyResponse) XXX_Marshal

func (m *EmptyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EmptyResponse) XXX_Merge

func (m *EmptyResponse) XXX_Merge(src proto.Message)

func (*EmptyResponse) XXX_Size

func (m *EmptyResponse) XXX_Size() int

func (*EmptyResponse) XXX_Unmarshal

func (m *EmptyResponse) XXX_Unmarshal(b []byte) error

type Endpoint

type Endpoint struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Host                 []string `protobuf:"bytes,2,rep,name=host,proto3" json:"host,omitempty"`
	Path                 []string `protobuf:"bytes,3,rep,name=path,proto3" json:"path,omitempty"`
	Method               []string `protobuf:"bytes,4,rep,name=method,proto3" json:"method,omitempty"`
	Stream               bool     `protobuf:"varint,5,opt,name=stream,proto3" json:"stream,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Endpoint) Descriptor

func (*Endpoint) Descriptor() ([]byte, []int)

func (*Endpoint) GetHost

func (m *Endpoint) GetHost() []string

func (*Endpoint) GetMethod

func (m *Endpoint) GetMethod() []string

func (*Endpoint) GetName

func (m *Endpoint) GetName() string

func (*Endpoint) GetPath

func (m *Endpoint) GetPath() []string

func (*Endpoint) GetStream

func (m *Endpoint) GetStream() bool

func (*Endpoint) ProtoMessage

func (*Endpoint) ProtoMessage()

func (*Endpoint) Reset

func (m *Endpoint) Reset()

func (*Endpoint) String

func (m *Endpoint) String() string

func (*Endpoint) XXX_DiscardUnknown

func (m *Endpoint) XXX_DiscardUnknown()

func (*Endpoint) XXX_Marshal

func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Endpoint) XXX_Merge

func (m *Endpoint) XXX_Merge(src proto.Message)

func (*Endpoint) XXX_Size

func (m *Endpoint) XXX_Size() int

func (*Endpoint) XXX_Unmarshal

func (m *Endpoint) XXX_Unmarshal(b []byte) error

type UnimplementedApiServer

type UnimplementedApiServer struct {
}

UnimplementedApiServer can be embedded to have forward compatible implementations.

func (*UnimplementedApiServer) Deregister

func (*UnimplementedApiServer) Register

Jump to

Keyboard shortcuts

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