41 lines
1.1 KiB
Go
41 lines
1.1 KiB
Go
|
// Code generated by protoc-gen-micro
|
||
|
// source: broker.proto
|
||
|
package service
|
||
|
|
||
|
import (
|
||
|
context "context"
|
||
|
proto "github.com/unistack-org/micro-broker-service/v3/proto"
|
||
|
api "github.com/unistack-org/micro/v3/api"
|
||
|
client "github.com/unistack-org/micro/v3/client"
|
||
|
)
|
||
|
|
||
|
func NewBrokerEndpoints() []*api.Endpoint {
|
||
|
return []*api.Endpoint{}
|
||
|
}
|
||
|
|
||
|
type BrokerClient interface {
|
||
|
Publish(ctx context.Context, req *proto.PublishRequest, opts ...client.CallOption) (*proto.Empty, error)
|
||
|
Subscribe(ctx context.Context, req *proto.SubscribeRequest, opts ...client.CallOption) (Broker_SubscribeClient, error)
|
||
|
}
|
||
|
|
||
|
type Broker_SubscribeClient interface {
|
||
|
Context() context.Context
|
||
|
SendMsg(msg interface{}) error
|
||
|
RecvMsg(msg interface{}) error
|
||
|
Close() error
|
||
|
Recv() (*proto.Message, error)
|
||
|
}
|
||
|
|
||
|
type BrokerServer interface {
|
||
|
Publish(ctx context.Context, req *proto.PublishRequest, rsp *proto.Empty) error
|
||
|
Subscribe(ctx context.Context, req *proto.SubscribeRequest, stream Broker_SubscribeStream) error
|
||
|
}
|
||
|
|
||
|
type Broker_SubscribeStream interface {
|
||
|
Context() context.Context
|
||
|
SendMsg(msg interface{}) error
|
||
|
RecvMsg(msg interface{}) error
|
||
|
Close() error
|
||
|
Send(msg *proto.Message) error
|
||
|
}
|