MCPcopy
hub / github.com/fagongzi/manba / AddBind

Method AddBind

pkg/service/rpc_meta.go:284–299  ·  view source on GitHub ↗
(ctx context.Context, req *rpcpb.AddBindReq)

Source from the content-addressed store, hash-verified

282}
283
284func (s *metaService) AddBind(ctx context.Context, req *rpcpb.AddBindReq) (*rpcpb.AddBindRsp, error) {
285 select {
286 case <-ctx.Done():
287 return nil, errRPCCancel
288 default:
289 err := s.db.AddBind(&metapb.Bind{
290 ClusterID: req.Cluster,
291 ServerID: req.Server,
292 })
293 if err != nil {
294 return nil, err
295 }
296
297 return &rpcpb.AddBindRsp{}, nil
298 }
299}
300
301func (s *metaService) Batch(ctx context.Context, req *rpcpb.BatchReq) (*rpcpb.BatchRsp, error) {
302 select {

Callers

nothing calls this directly

Calls 1

AddBindMethod · 0.65

Tested by

no test coverage detected