Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
var MoCtlTNCmdSender = func(ctx context.Context, proc *process.Process, requests []txn.CNOpRequest) ([]txn.CNOpResponse, error) { txnOp := proc.TxnOperator if txnOp == nil { return nil, moerr.NewInternalError(ctx, "ctl: txn operator is nil") } debugRequests := make([]txn.TxnRequest, 0, len(requests)) for _, req := range requests { tq := txn.NewTxnRequest(&req) tq.Method = txn.TxnMethod_DEBUG debugRequests = append(debugRequests, tq) } result, err := txnOp.Debug(ctx, debugRequests) if err != nil { return nil, err } defer result.Release() responses := make([]txn.CNOpResponse, 0, len(requests)) for _, resp := range result.Responses { responses = append(responses, *resp.CNOpResponse) } return responses, nil }
Functions ¶
func GetTNHandlerFunc ¶ added in v1.0.1
func GetTNHandlerFunc(method pb.CmdMethod, whichTN func(parameter string) ([]uint64, error), payload func(tnShardID uint64, parameter string, proc *process.Process) ([]byte, error), repsonseUnmarshaler func([]byte) (interface{}, error)) handleFunc
GetTNHandlerFunc used to handle dn's debug command handle func. method: debug command type. whichDN: used to decide which DNs to send the debug request to, nil returned means send all dns. payload: used to get debug command request payload repsonseUnmarshaler: used to unmarshal response
Types ¶
This section is empty.
 Click to show internal directories. 
   Click to hide internal directories.