cmd

package
v0.0.0-...-97d2b70 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Copyright © 2020 GUILLAUME FOURNIER

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var FSProbeCmd = &cobra.Command{
	Use:   "fsprobe [paths]",
	Short: "A file system events notifier based on eBPF",
	Long: `FSProbe is a file system events notifier based on eBPF

FSProbe relies on eBPF to capture file system events on dentry kernel structures.
More information about the project can be found on github: https://github.com/Gui774ume/fsprobe`,
	RunE:    runFSProbeCmd,
	Example: "sudo fsprobe /tmp",
}

FSProbeCmd represents the base command when called without any subcommands

Functions

This section is empty.

Types

type CLIOptions

type CLIOptions struct {
	Format         string
	OutputFilePath string
	Paths          []string
	FSOptions      model.FSProbeOptions
}

CLIOptions - Command line options

type DentryResolutionModeValue

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

func (*DentryResolutionModeValue) Set

func (drm *DentryResolutionModeValue) Set(val string) error

func (*DentryResolutionModeValue) String

func (drm *DentryResolutionModeValue) String() string

func (*DentryResolutionModeValue) Type

func (drm *DentryResolutionModeValue) Type() string

type DummyOutput

type DummyOutput struct{}

DummyOutput - Dummy output for the none format

func (DummyOutput) Write

func (do DummyOutput) Write(event *model.FSEvent) error

Write - Write the event to the output writer

type EventsValue

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

func NewEventsValue

func NewEventsValue(events *[]model.EventName) *EventsValue

func (*EventsValue) Set

func (ev *EventsValue) Set(val string) error

func (*EventsValue) String

func (ev *EventsValue) String() string

func (*EventsValue) Type

func (ev *EventsValue) Type() string

type JSONOutput

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

JSONOutput - JSON output writer

func (JSONOutput) Write

func (so JSONOutput) Write(event *model.FSEvent) error

Write - Write the event to the output writer

type Output

type Output struct {
	EvtChan  chan *model.FSEvent
	LostChan chan *model.LostEvt
	// contains filtered or unexported fields
}

func NewOutput

func NewOutput(options CLIOptions) (*Output, error)

NewOutput - Returns an output instance configured with the requested format & output

func (*Output) Callback

func (o *Output) Callback()

func (*Output) Close

func (o *Output) Close()

func (*Output) Start

func (o *Output) Start()

type OutputWriter

type OutputWriter interface {
	Write(event *model.FSEvent) error
}

OutputWriter - Data output interface

type TableOutput

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

TableOutput - Table output writer

func NewTableOutput

func NewTableOutput(writer io.Writer) TableOutput

func (TableOutput) PrintHeader

func (to TableOutput) PrintHeader()

PrintHeader - Prints table header

func (TableOutput) Write

func (to TableOutput) Write(event *model.FSEvent) error

Write - Write the event to the output writer

Jump to

Keyboard shortcuts

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