Skip to content

Commit

Permalink
add client implementation for revokeBlockPoolPeering rpc call
Browse files Browse the repository at this point in the history
Signed-off-by: Rewant Soni <[email protected]>
  • Loading branch information
rewantsoni committed Mar 6, 2024
1 parent 334eace commit a2466fb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions services/provider/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,19 @@ func (cc *OCSProviderClient) PeerBlockPool(ctx context.Context, secretName strin

return cc.Client.PeerBlockPool(apiCtx, req)
}

func (cc *OCSProviderClient) RevokeBlockPoolPeering(ctx context.Context, secretName string, pool []byte) (*pb.RevokeBlockPoolPeeringResponse, error) {
if cc.Client == nil || cc.clientConn == nil {
return nil, fmt.Errorf("OCS client is closed")
}

req := &pb.RevokeBlockPoolPeeringRequest{
SecretName: secretName,
Pool: pool,
}

apiCtx, cancel := context.WithTimeout(ctx, cc.timeout)
defer cancel()

return cc.Client.RevokeBlockPoolPeering(apiCtx, req)
}

0 comments on commit a2466fb

Please sign in to comment.