kubernetes: k8s.io/kubernetes/pkg/kubectl/cmd/logs Index | Files

package logs

import "k8s.io/kubernetes/pkg/kubectl/cmd/logs"


Package Files


func DefaultConsumeRequest Uses

func DefaultConsumeRequest(request rest.ResponseWrapper, out io.Writer) error

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 Uses

func NewCmdLogs(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command

NewCmdLogs creates a new pod logs command

type LogsOptions Uses

type LogsOptions struct {
    Namespace     string
    ResourceArg   string
    AllContainers bool
    Options       runtime.Object
    Resources     []string

    ConsumeRequestFn func(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

    // whether or not a container name was given via --container
    ContainerNameSpecified bool
    Selector               string
    MaxFollowConcurency    int

    Object           runtime.Object
    GetPodTimeout    time.Duration
    RESTClientGetter genericclioptions.RESTClientGetter
    LogsForObject    polymorphichelpers.LogsForObjectFunc


    TailSpecified bool

func NewLogsOptions Uses

func NewLogsOptions(streams genericclioptions.IOStreams, allContainers bool) *LogsOptions

func (*LogsOptions) Complete Uses

func (o *LogsOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error

func (LogsOptions) RunLogs Uses

func (o LogsOptions) RunLogs() error

RunLogs retrieves a pod log

func (*LogsOptions) ToLogOptions Uses

func (o *LogsOptions) ToLogOptions() (*corev1.PodLogOptions, error)

func (LogsOptions) Validate Uses

func (o LogsOptions) Validate() error

Package logs imports 19 packages (graph) and is imported by 22 packages. Updated 2019-07-24. Refresh now. Tools for package owners.