heal

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Overview

Package heal contains an implementation of LivenessChecker.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KernelLivenessCheck

func KernelLivenessCheck(deadlineCtx context.Context, conn *networkservice.Connection) bool

KernelLivenessCheck is an implementation of heal.LivenessCheck

func KernelLivenessCheckWithOptions added in v1.10.0

func KernelLivenessCheckWithOptions(deadlineCtx context.Context, conn *networkservice.Connection, opts ...Option) bool

KernelLivenessCheckWithOptions is an implementation with options of heal.LivenessCheck. It sends ICMP ping and checks reply. Returns false if didn't get reply.

Types

type Option added in v1.10.0

type Option func(o *options)

Option is an option pattern for LivelinessChecker

func WithPingerFactory added in v1.10.0

func WithPingerFactory(pf PingerFactory) Option

WithPingerFactory - sets any custom pinger factory

type Pinger added in v1.10.0

type Pinger interface {
	Run() error
	GetReceivedPackets() int
}

Pinger - pinger interface

type PingerFactory added in v1.10.0

type PingerFactory interface {
	CreatePinger(srcIP, dstIP string, timeout time.Duration, count int) Pinger
}

PingerFactory - factory interface for creating pingers

Jump to

Keyboard shortcuts

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