add router plugin

This commit is contained in:
ginuerzh
2023-11-19 14:21:32 +08:00
parent bfe81cbb44
commit d959ab5484
8 changed files with 692 additions and 107 deletions

View File

@ -19,14 +19,14 @@ type server struct {
proto.UnimplementedIngressServer
}
func (s *server) Get(ctx context.Context, in *proto.GetRequest) (*proto.GetReply, error) {
reply := &proto.GetReply{}
func (s *server) GetRule(ctx context.Context, in *proto.GetRuleRequest) (*proto.GetRuleReply, error) {
reply := &proto.GetRuleReply{}
log.Printf("ingress get: %s", in.GetHost())
return reply, nil
}
func (s *server) Set(ctx context.Context, in *proto.SetRequest) (*proto.SetReply, error) {
reply := &proto.SetReply{}
func (s *server) SetRule(ctx context.Context, in *proto.SetRuleRequest) (*proto.SetRuleReply, error) {
reply := &proto.SetRuleReply{}
log.Printf("ingress set: %s -> %s", in.GetHost(), in.GetEndpoint())
return reply, nil