Skip to content

Commit

Permalink
feat: client to doer
Browse files Browse the repository at this point in the history
  • Loading branch information
FGYFFFF committed Jun 17, 2024
1 parent e4da4d0 commit aac79ff
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (

"github.com/cloudwego/hertz/pkg/app/client"
"github.com/cloudwego/hertz/pkg/protocol"
do "github.com/cloudwego/hertz/pkg/protocol/client"
"github.com/cloudwego/hertz/pkg/protocol/consts"
)

Expand All @@ -47,7 +48,7 @@ type ResponseCallback func(ctx context.Context, req *protocol.Request, resp *pro

// Client handles an incoming server stream
type Client struct {
hertzClient *client.Client
hertzClient do.Doer
disconnectCallback ConnCallback
connectedCallback ConnCallback
responseCallback ResponseCallback
Expand Down Expand Up @@ -202,7 +203,7 @@ func (c *Client) SetResponseCallback(responseCallback ResponseCallback) {
}

// SetHertzClient set sse client
func (c *Client) SetHertzClient(hertzClient *client.Client) {
func (c *Client) SetHertzClient(hertzClient do.Doer) {
c.hertzClient = hertzClient
}

Expand All @@ -227,7 +228,7 @@ func (c *Client) GetMethod() string {
}

// GetHertzClient get sse client
func (c *Client) GetHertzClient() *client.Client {
func (c *Client) GetHertzClient() do.Doer {
return c.hertzClient
}

Expand Down

0 comments on commit aac79ff

Please sign in to comment.