system

package
v0.0.0-...-ebd033e Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package system provides gNOI system operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KillProcessOperation

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

KillProcessOperation represents the parameters of a KillProcess operation.

func NewKillProcessOperation

func NewKillProcessOperation() *KillProcessOperation

NewKillProcessOperation creates an empty KillProcessOperation.

func (*KillProcessOperation) Execute

Execute performs the KillProcess operation.

func (*KillProcessOperation) Name

Name specifies the name of the process to be killed.

func (*KillProcessOperation) PID

PID specifies the process ID of the process to be killed.

func (*KillProcessOperation) Restart

Restart specifies whether the process should be restarted after termination.

func (*KillProcessOperation) Signal

Signal specifies the termination signal sent to the process.

type PingOperation

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

PingOperation represents the parameters of a Ping operation.

func NewPingOperation

func NewPingOperation() *PingOperation

NewPingOperation creates an empty PingOperation.

func (*PingOperation) Count

func (p *PingOperation) Count(c int32) *PingOperation

Count specifies the number of packets.

func (*PingOperation) Destination

func (p *PingOperation) Destination(dst string) *PingOperation

Destination specifies the address to ping.

func (*PingOperation) DoNotFragment

func (p *PingOperation) DoNotFragment(dnf bool) *PingOperation

DoNotFragment sets the do not fragment bit (IPv4 destinations).

func (*PingOperation) DoNotResolve

func (p *PingOperation) DoNotResolve(dnr bool) *PingOperation

DoNotResolve specifies if address returned should be resolved.

func (*PingOperation) Execute

func (p *PingOperation) Execute(ctx context.Context, c *internal.Clients) ([]*spb.PingResponse, error)

Execute performs the Ping operation.

func (*PingOperation) Interval

func (p *PingOperation) Interval(i time.Duration) *PingOperation

Interval specifies the duration between ping requests.

func (*PingOperation) L3Protocol

func (p *PingOperation) L3Protocol(l3p tpb.L3Protocol) *PingOperation

L3Protocol specifies layer3 protocol for the ping.

func (*PingOperation) Size

func (p *PingOperation) Size(s int32) *PingOperation

Size specifies the size of request packet (excluding ICMP header).

func (*PingOperation) Source

func (p *PingOperation) Source(src string) *PingOperation

Source specifies the address to ping from.

func (*PingOperation) Wait

Wait specifies the duration to wait for a response.

type RebootOperation

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

RebootOperation represents the parameters of a Reboot operation.

func NewRebootOperation

func NewRebootOperation() *RebootOperation

NewRebootOperation creates an empty RebootOperation.

func (*RebootOperation) Delay

func (r *RebootOperation) Delay(delay time.Duration) *RebootOperation

Delay specifies time in nanoseconds to wait before issuing reboot.

func (*RebootOperation) Execute

Execute performs the Reboot operation.

func (*RebootOperation) Force

func (r *RebootOperation) Force(force bool) *RebootOperation

Force reboot if sanity checks fail.

func (*RebootOperation) Message

func (r *RebootOperation) Message(message string) *RebootOperation

Message specifies informational reason for the reboot or cancel reboot.

func (*RebootOperation) RebootMethod

func (r *RebootOperation) RebootMethod(rebootMethod spb.RebootMethod) *RebootOperation

RebootMethod specifies method to reboot.

func (*RebootOperation) Subcomponents

func (r *RebootOperation) Subcomponents(subcomponents []*tpb.Path) *RebootOperation

Subcomponents specifies the sub-components to reboot.

type RebootStatusOperation

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

RebootStatusOperation represents the parameters of a RebootStatus operation.

func NewRebootStatusOperation

func NewRebootStatusOperation() *RebootStatusOperation

NewRebootStatusOperation creates an empty RebootStatusOperation.

func (*RebootStatusOperation) Execute

Execute performs the RebootStatus operation.

func (*RebootStatusOperation) Subcomponents

func (r *RebootStatusOperation) Subcomponents(subcomponents []*tpb.Path) *RebootStatusOperation

Subcomponents specifies the sub-components whose status will be checked.

type SwitchControlProcessorOperation

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

SwitchControlProcessorOperation represents the parameters of a SwitchControlProcessor operation.

func NewSwitchControlProcessorOperation

func NewSwitchControlProcessorOperation() *SwitchControlProcessorOperation

NewSwitchControlProcessorOperation creates an empty SwitchControlProcessorOperation.

func (*SwitchControlProcessorOperation) Execute

Execute performs the SwitchControlProcessor operation.

func (*SwitchControlProcessorOperation) Path

Path sets the path of the target route processor.

func (*SwitchControlProcessorOperation) PathFromSubcomponentName

PathFromSubcomponentName sets the path of the target route processor to `/openconfig/components/component[name=<n>]`.

type TimeOperation

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

TimeOperation represents the parameters of a Time operation.

func NewTimeOperation

func NewTimeOperation() *TimeOperation

NewTimeOperation creates an empty TimeOperation.

func (*TimeOperation) Execute

Execute performs the Time operation.

type TracerouteOperation

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

TracerouteOperation represents the parameters of a Traceroute operation.

func NewTracerouteOperation

func NewTracerouteOperation() *TracerouteOperation

NewTracerouteOperation creates an empty TracerouteOperation.

func (*TracerouteOperation) Destination

func (t *TracerouteOperation) Destination(dst string) *TracerouteOperation

Destination specifies address to perform traceroute to.

func (*TracerouteOperation) DoNotFragment

func (t *TracerouteOperation) DoNotFragment(dnf bool) *TracerouteOperation

DoNotFragment sets the do not fragment bit. (IPv4 destinations)

func (*TracerouteOperation) DoNotLookupASN

func (t *TracerouteOperation) DoNotLookupASN(asn bool) *TracerouteOperation

DoNotLookupASN specifies if traceroute should try to lookup ASN.

func (*TracerouteOperation) DoNotResolve

func (t *TracerouteOperation) DoNotResolve(dnr bool) *TracerouteOperation

DoNotResolve specifies if address returned should be resolved.

func (*TracerouteOperation) Execute

Execute performs the Traceroute operation.

func (*TracerouteOperation) InitialTTL

func (t *TracerouteOperation) InitialTTL(ttl uint32) *TracerouteOperation

InitialTTL specifies traceroute ttl (default is 1).

func (*TracerouteOperation) L3Protocol

L3Protocol specifies layer3 protocol for the traceroute.

func (*TracerouteOperation) L4Protocol

L4Protocol specifies layer3 protocol for the traceroute.

func (*TracerouteOperation) MaxTTL

MaxTTL specifies maximum number of hops.

func (*TracerouteOperation) Source

Source specifies address to perform traceroute from.

func (*TracerouteOperation) Wait

Wait specifies the duration to wait for a response.

Jump to

Keyboard shortcuts

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