Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConsumeRequest ¶
DefaultConsumeRequest reads the data from request and writes into the out writer. It buffers data from requests until the newline or io.EOF occurs in the data, so it doesn't interleave logs sub-line when running concurrently.
A successful read returns err == nil, not err == io.EOF. Because the function is defined to read from request until io.EOF, it does not treat an io.EOF as an error to be reported.
func NewCmdLogs ¶
NewCmdLogs creates a new pod logs command
Types ¶
type LogsOptions ¶
type LogsOptions struct { Namespace string ResourceArg string AllContainers bool AllPods bool Options runtime.Object Resources []string ConsumeRequestFn func(context.Context, rest.ResponseWrapper, io.Writer) error // PodLogOptions SinceTime string SinceSeconds time.Duration Follow bool Previous bool Timestamps bool IgnoreLogErrors bool LimitBytes int64 Tail int64 Container string InsecureSkipTLSVerifyBackend bool // whether or not a container name was given via --container ContainerNameSpecified bool Selector string MaxFollowConcurrency int Prefix bool Object runtime.Object GetPodTimeout time.Duration RESTClientGetter genericclioptions.RESTClientGetter LogsForObject polymorphichelpers.LogsForObjectFunc AllPodLogsForObject polymorphichelpers.AllPodLogsForObjectFunc genericiooptions.IOStreams TailSpecified bool // contains filtered or unexported fields }
func NewLogsOptions ¶
func NewLogsOptions(streams genericiooptions.IOStreams) *LogsOptions
func (*LogsOptions) AddFlags ¶ added in v0.18.0
func (o *LogsOptions) AddFlags(cmd *cobra.Command)
func (*LogsOptions) ToLogOptions ¶
func (o *LogsOptions) ToLogOptions() (*corev1.PodLogOptions, error)
func (LogsOptions) Validate ¶
func (o LogsOptions) Validate() error
Click to show internal directories.
Click to hide internal directories.