You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: client.go
    path of file: ./repos/sentinel-golang/pkg/adapters/hertz
    
    the code of the file until where you have to start completion: package hertz

import (
	"context"

	sentinel "github.com/alibaba/sentinel-golang/api"
	"github.com/alibaba/sentinel-golang/core/base"
	"github.com/cloudwego/hertz/pkg/app/client"
	"github.com/cloudwego/hertz/pkg/protocol"
)

// SentinelClientMiddleware returns new client.Middleware
// Default resource name is {method}:{path}, such as "GET:/api/users"
// Default block f
    
func SentinelClientMiddleware(opts ...ClientOption) client.Middleware {
	options := newClientOptions(opts)
	return func(next client.Endpoint) client.Endpoint {
		return func(ctx context.Context, req *protocol.Request, resp *protocol.Response) (err error) {
			resourceName := options.resourceExtract(ctx, req, resp)
			entry, blockErr := sentinel.Entry(
				resourceName,
				sentinel.WithResourceType(base.ResTypeWeb),
				sentinel.WithTrafficType(base.Outbound),
			)
			if blockErr != nil {
				return options.blockFallback(ctx, req, resp, blockErr)
			}

			defer entry.Exit()
			err = next(ctx, req, resp)
			if err != nil {
				sentinel.TraceError(entry, err)
				return err
			}
			return nil
		}
	}
}