feat: expose logs method on container interface (#17526)
This commit is contained in:
parent
1fc4bea448
commit
67be774707
|
@ -5,6 +5,7 @@ package cluster
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"io"
|
||||||
|
|
||||||
"github.com/testcontainers/testcontainers-go"
|
"github.com/testcontainers/testcontainers-go"
|
||||||
|
|
||||||
|
@ -22,6 +23,7 @@ type Agent interface {
|
||||||
GetAgentName() string
|
GetAgentName() string
|
||||||
GetPartition() string
|
GetPartition() string
|
||||||
GetPod() testcontainers.Container
|
GetPod() testcontainers.Container
|
||||||
|
Logs(context.Context) (io.ReadCloser, error)
|
||||||
ClaimAdminPort() (int, error)
|
ClaimAdminPort() (int, error)
|
||||||
GetConfig() Config
|
GetConfig() Config
|
||||||
GetInfo() AgentInfo
|
GetInfo() AgentInfo
|
||||||
|
|
|
@ -68,6 +68,10 @@ func (c *consulContainerNode) GetPod() testcontainers.Container {
|
||||||
return c.pod
|
return c.pod
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *consulContainerNode) Logs(context context.Context) (io.ReadCloser, error) {
|
||||||
|
return c.container.Logs(context)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *consulContainerNode) ClaimAdminPort() (int, error) {
|
func (c *consulContainerNode) ClaimAdminPort() (int, error) {
|
||||||
if c.nextAdminPortOffset >= MaxEnvoyOnNode {
|
if c.nextAdminPortOffset >= MaxEnvoyOnNode {
|
||||||
return 0, fmt.Errorf("running out of envoy admin port, max %d, already claimed %d",
|
return 0, fmt.Errorf("running out of envoy admin port, max %d, already claimed %d",
|
||||||
|
|
Loading…
Reference in New Issue