-
Notifications
You must be signed in to change notification settings - Fork 3
/
interface.go
19 lines (17 loc) · 1.01 KB
/
interface.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package callback
import (
pb "github.com/meitu/bifrost/grpc/callback"
"golang.org/x/net/context"
)
type Callback interface {
OnConnect(ctx context.Context, service string, request *pb.OnConnectRequest) (*pb.OnConnectReply, error)
OnSubscribe(ctx context.Context, service string, request *pb.OnSubscribeRequest) (*pb.OnSubscribeReply, error)
PostSubscribe(ctx context.Context, service string, request *pb.PostSubscribeRequest) (*pb.PostSubscribeReply, error)
OnPublish(ctx context.Context, service string, request *pb.OnPublishRequest) (*pb.OnPublishReply, error)
OnUnsubscribe(ctx context.Context, service string, request *pb.OnUnsubscribeRequest) (*pb.OnUnsubscribeReply, error)
OnDisconnect(ctx context.Context, service string, request *pb.OnDisconnectRequest) (*pb.OnDisconnectReply, error)
OnACK(ctx context.Context, service string, request *pb.OnACKRequest) (*pb.OnACKReply, error)
OnOffline(ctx context.Context, service string, request *pb.OnOfflineRequest) (*pb.OnOfflineReply, error)
Close() error
String() string
}