cmd

package
v0.1.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2018 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CloseDelayDuration = 3 * time.Second
)
View Source
const (
	// クライアントから受信したアイテムのバッファサイズ。
	// 単位はメッセージの個数。
	DefaultReceiveBufferSize = 128
)

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "cmd",
	Short: "Function calls tracer for golang",
}

RootCmd represents the base command when called without any subcommands

Functions

func Execute

func Execute() int

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type CobraHandler

type CobraHandler func(cmd *cobra.Command, args []string) error

type Handler

type Handler func(conf *config.Config, cmd *cobra.Command, args []string) error

type JsonLogWriter

type JsonLogWriter struct {
	// contains filtered or unexported fields
}

func NewJsonLogWriter

func NewJsonLogWriter(output io.Writer) *JsonLogWriter

func (*JsonLogWriter) SetGoFuncGetter

func (w *JsonLogWriter) SetGoFuncGetter(func(pc uintptr) types.GoFunc)

func (*JsonLogWriter) SetGoLineGetter

func (w *JsonLogWriter) SetGoLineGetter(func(pc uintptr) types.GoLine)

func (*JsonLogWriter) Write

func (w *JsonLogWriter) Write(evt types.FuncLog) error

func (*JsonLogWriter) WriteHeader

func (w *JsonLogWriter) WriteHeader() error

type LogWriter

type LogWriter interface {
	WriteHeader() error
	Write(evt types.FuncLog) error
	SetGoFuncGetter(func(pc uintptr) types.GoFunc)
	SetGoLineGetter(func(pc uintptr) types.GoLine)
}

func NewLogWriter

func NewLogWriter(format string, out io.Writer) (LogWriter, error)

type TextLogWriter

type TextLogWriter struct {
	// contains filtered or unexported fields
}

func NewTextLogWriter

func NewTextLogWriter(output io.Writer) *TextLogWriter

func (*TextLogWriter) SetGoFuncGetter

func (w *TextLogWriter) SetGoFuncGetter(f func(pc uintptr) types.GoFunc)

func (*TextLogWriter) SetGoLineGetter

func (w *TextLogWriter) SetGoLineGetter(f func(pc uintptr) types.GoLine)

func (*TextLogWriter) Write

func (w *TextLogWriter) Write(evt types.FuncLog) error

func (*TextLogWriter) WriteHeader

func (w *TextLogWriter) WriteHeader() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL