mirror of
https://github.com/status-im/consul.git
synced 2025-02-19 17:14:37 +00:00
feat: expose logs method on container interface (#17526)
This commit is contained in:
parent
a065eef3ef
commit
217248ba31
@ -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…
x
Reference in New Issue
Block a user