github.com/nyan233/littlerpc@v0.4.6-0.20230316182519-0c8d5c48abaf/cmd/pxtor/test/proxy_1_split1.go (about)

     1  package test
     2  
     3  import (
     4  	"context"
     5  	"errors"
     6  	"github.com/nyan233/littlerpc/core/common/errorhandler"
     7  	"github.com/nyan233/littlerpc/core/container"
     8  	perror "github.com/nyan233/littlerpc/core/protocol/error"
     9  )
    10  
    11  func (p *Test) ErrHandler(s1 string) (err error) {
    12  	return errors.New(s1)
    13  }
    14  
    15  func (p *Test) ErrHandler2(s1 string) (err error) {
    16  	return perror.LNewStdError(errorhandler.Success.Code(), errorhandler.Success.Message())
    17  }
    18  
    19  func (p *Test) ImportTest(l1 container.ByteSlice) (err error) {
    20  	return nil
    21  }
    22  
    23  func (p *Test) ImportTest2(ctx context.Context, l1 container.ByteSlice, l2 *container.ByteSlice) (err error) {
    24  	return nil
    25  }