Skip to content

Commit

Permalink
Fix elastic-agent 7.17 build (elastic#40023)
Browse files Browse the repository at this point in the history
* Fix http.MethodGet constant usage in elastic-agent server code

* Change usage from proto.ConnInfo to proto.StartupInfo in elastic-agent
  • Loading branch information
pchila authored Jun 26, 2024
1 parent 2cd9214 commit f926090
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion x-pack/elastic-agent/pkg/agent/control/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func (s *Server) ProcMeta(ctx context.Context, _ *cproto.Empty) (*cproto.ProcMet
endpoint = "npipe"
}

req, err := http.NewRequestWithContext(ctx, http.MethodGET, "http://"+endpoint+"/", nil)
req, err := http.NewRequestWithContext(ctx, http.MethodGet, "http://"+endpoint+"/", nil)
if err != nil {
procMeta.Error = err.Error()
resp.Procs = append(resp.Procs, procMeta)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ type TestConfig struct {
TestFile string `config:"TestFile" yaml:"TestFile"`
}

func getCreds(port int) (*proto.ConnInfo, error) {
func getCreds(port int) (*proto.StartUpInfo, error) {
c, err := net.Dial("tcp", fmt.Sprintf("127.0.0.1:%d", port))
if err != nil {
return nil, err
Expand All @@ -113,7 +113,7 @@ func getCreds(port int) (*proto.ConnInfo, error) {
if err != nil {
return nil, err
}
var connInfo proto.ConnInfo
var connInfo proto.StartUpInfo
err = protobuf.Unmarshal(buf[:n], &connInfo)
if err != nil {
return nil, err
Expand Down

0 comments on commit f926090

Please sign in to comment.