...

Source file src/github.com/redhat-developer/odo/pkg/logs/interface.go

Documentation: github.com/redhat-developer/odo/pkg/logs

     1  package logs
     2  
     3  import (
     4  	"context"
     5  	"io"
     6  )
     7  
     8  type Client interface {
     9  	DisplayLogs(
    10  		ctx context.Context,
    11  		mode string,
    12  		componentName string,
    13  		namespace string,
    14  		follow bool,
    15  		out io.Writer,
    16  	) error
    17  
    18  	// GetLogsForMode gets logs of the containers for the specified mode (Dev, Deploy or both) of the provided
    19  	// component name and namespace. It returns Events which has multiple channels. Logs are put on the
    20  	// Events.Logs channel and errors on Events.Err. Events.Done channel is populated to indicate that all Pods' logs
    21  	// have been fetched.
    22  	// The accepted values for mode are ComponentDevMode, ComponentDeployMode and ComponentAnyMode
    23  	// found in the pkg/labels package.
    24  	// Setting follow boolean to true helps follow/tail the logs of the pods.
    25  	GetLogsForMode(
    26  		ctx context.Context,
    27  		mode string,
    28  		componentName string,
    29  		namespace string,
    30  		follow bool,
    31  	) (Events, error)
    32  }
    33  

View as plain text