Documentation ¶
Overview ¶
Package system provides gNOI system operations.
Index ¶
- type KillProcessOperation
- func (k *KillProcessOperation) Execute(ctx context.Context, c *internal.Clients) (*spb.KillProcessResponse, error)
- func (k *KillProcessOperation) Name(n string) *KillProcessOperation
- func (k *KillProcessOperation) PID(pid uint32) *KillProcessOperation
- func (k *KillProcessOperation) Restart(r bool) *KillProcessOperation
- func (k *KillProcessOperation) Signal(s spb.KillProcessRequest_Signal) *KillProcessOperation
- type PingOperation
- func (p *PingOperation) Count(c int32) *PingOperation
- func (p *PingOperation) Destination(dst string) *PingOperation
- func (p *PingOperation) DoNotFragment(dnf bool) *PingOperation
- func (p *PingOperation) DoNotResolve(dnr bool) *PingOperation
- func (p *PingOperation) Execute(ctx context.Context, c *internal.Clients) ([]*spb.PingResponse, error)
- func (p *PingOperation) Interval(i time.Duration) *PingOperation
- func (p *PingOperation) L3Protocol(l3p tpb.L3Protocol) *PingOperation
- func (p *PingOperation) Size(s int32) *PingOperation
- func (p *PingOperation) Source(src string) *PingOperation
- func (p *PingOperation) Wait(w time.Duration) *PingOperation
- type RebootOperation
- func (r *RebootOperation) Delay(delay time.Duration) *RebootOperation
- func (r *RebootOperation) Execute(ctx context.Context, c *internal.Clients) (*spb.RebootResponse, error)
- func (r *RebootOperation) Force(force bool) *RebootOperation
- func (r *RebootOperation) Message(message string) *RebootOperation
- func (r *RebootOperation) RebootMethod(rebootMethod spb.RebootMethod) *RebootOperation
- func (r *RebootOperation) Subcomponents(subcomponents []*tpb.Path) *RebootOperation
- type RebootStatusOperation
- type SwitchControlProcessorOperation
- func (s *SwitchControlProcessorOperation) Execute(ctx context.Context, c *internal.Clients) (*spb.SwitchControlProcessorResponse, error)
- func (s *SwitchControlProcessorOperation) Path(p *tpb.Path) *SwitchControlProcessorOperation
- func (s *SwitchControlProcessorOperation) PathFromSubcomponentName(n string) *SwitchControlProcessorOperation
- type TimeOperation
- type TracerouteOperation
- func (t *TracerouteOperation) Destination(dst string) *TracerouteOperation
- func (t *TracerouteOperation) DoNotFragment(dnf bool) *TracerouteOperation
- func (t *TracerouteOperation) DoNotLookupASN(asn bool) *TracerouteOperation
- func (t *TracerouteOperation) DoNotResolve(dnr bool) *TracerouteOperation
- func (t *TracerouteOperation) Execute(ctx context.Context, c *internal.Clients) ([]*spb.TracerouteResponse, error)
- func (t *TracerouteOperation) InitialTTL(ttl uint32) *TracerouteOperation
- func (t *TracerouteOperation) L3Protocol(l3 tpb.L3Protocol) *TracerouteOperation
- func (t *TracerouteOperation) L4Protocol(l4 spb.TracerouteRequest_L4Protocol) *TracerouteOperation
- func (t *TracerouteOperation) MaxTTL(ttl int32) *TracerouteOperation
- func (t *TracerouteOperation) Source(src string) *TracerouteOperation
- func (t *TracerouteOperation) Wait(wait time.Duration) *TracerouteOperation
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 ¶
func (k *KillProcessOperation) Execute(ctx context.Context, c *internal.Clients) (*spb.KillProcessResponse, error)
Execute performs the KillProcess operation.
func (*KillProcessOperation) Name ¶
func (k *KillProcessOperation) Name(n string) *KillProcessOperation
Name specifies the name of the process to be killed.
func (*KillProcessOperation) PID ¶
func (k *KillProcessOperation) PID(pid uint32) *KillProcessOperation
PID specifies the process ID of the process to be killed.
func (*KillProcessOperation) Restart ¶
func (k *KillProcessOperation) Restart(r bool) *KillProcessOperation
Restart specifies whether the process should be restarted after termination.
func (*KillProcessOperation) Signal ¶
func (k *KillProcessOperation) Signal(s spb.KillProcessRequest_Signal) *KillProcessOperation
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 ¶
func (p *PingOperation) Wait(w time.Duration) *PingOperation
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 ¶
func (r *RebootOperation) Execute(ctx context.Context, c *internal.Clients) (*spb.RebootResponse, error)
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 ¶
func (r *RebootStatusOperation) Execute(ctx context.Context, c *internal.Clients) (*spb.RebootStatusResponse, error)
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 ¶
func (s *SwitchControlProcessorOperation) Execute(ctx context.Context, c *internal.Clients) (*spb.SwitchControlProcessorResponse, error)
Execute performs the SwitchControlProcessor operation.
func (*SwitchControlProcessorOperation) Path ¶
func (s *SwitchControlProcessorOperation) Path(p *tpb.Path) *SwitchControlProcessorOperation
Path sets the path of the target route processor.
func (*SwitchControlProcessorOperation) PathFromSubcomponentName ¶
func (s *SwitchControlProcessorOperation) PathFromSubcomponentName(n string) *SwitchControlProcessorOperation
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 ¶
func (t *TimeOperation) Execute(ctx context.Context, c *internal.Clients) (*spb.TimeResponse, error)
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 ¶
func (t *TracerouteOperation) Execute(ctx context.Context, c *internal.Clients) ([]*spb.TracerouteResponse, error)
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 ¶
func (t *TracerouteOperation) L3Protocol(l3 tpb.L3Protocol) *TracerouteOperation
L3Protocol specifies layer3 protocol for the traceroute.
func (*TracerouteOperation) L4Protocol ¶
func (t *TracerouteOperation) L4Protocol(l4 spb.TracerouteRequest_L4Protocol) *TracerouteOperation
L4Protocol specifies layer3 protocol for the traceroute.
func (*TracerouteOperation) MaxTTL ¶
func (t *TracerouteOperation) MaxTTL(ttl int32) *TracerouteOperation
MaxTTL specifies maximum number of hops.
func (*TracerouteOperation) Source ¶
func (t *TracerouteOperation) Source(src string) *TracerouteOperation
Source specifies address to perform traceroute from.
func (*TracerouteOperation) Wait ¶
func (t *TracerouteOperation) Wait(wait time.Duration) *TracerouteOperation
Wait specifies the duration to wait for a response.