Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

feat: support go-redis/v9 #11

Closed
wants to merge 2 commits into from
Closed

feat: support go-redis/v9 #11

wants to merge 2 commits into from

Conversation

jkskj
Copy link

@jkskj jkskj commented Aug 5, 2024

Add support for new go-redis version v9.
The Hook interface has changed significantly in v9.

// old v8
type Hook interface {
	BeforeProcess(ctx context.Context, cmd Cmder) (context.Context, error)
	AfterProcess(ctx context.Context, cmd Cmder) error

	BeforeProcessPipeline(ctx context.Context, cmds []Cmder) (context.Context, error)
	AfterProcessPipeline(ctx context.Context, cmds []Cmder) error
}
// new v9
type Hook interface {
	DialHook(next DialHook) DialHook  
	ProcessHook(next ProcessHook) ProcessHook  
	ProcessPipelineHook(next ProcessPipelineHook) ProcessPipelineHook  
}

type (
	DialHook            func(ctx context.Context, network, addr string) (net.Conn, error)
	ProcessHook         func(ctx context.Context, cmd Cmder) error
	ProcessPipelineHook func(ctx context.Context, cmds []Cmder) error
)

Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jkskj

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@GuangmingLuo
Copy link
Member

Hi, are you a user of this repo ? Actually, we want to archive this repo. Users are suggested to use OpenTelemetry.

@jkskj
Copy link
Author

jkskj commented Aug 5, 2024

Yes,I'm a user of this repo.In this case,should I close this pr?

@GuangmingLuo
Copy link
Member

OpenTracing is officially archived by CNCF, please use OpenTelemetry instead.

@jkskj
Copy link
Author

jkskj commented Aug 5, 2024

Thank you,I will close this pr.

@jkskj jkskj closed this Aug 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants