tasks

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT

Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT

Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT

Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT

Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT

Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT

Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT

Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT

Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT

Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT

Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT

Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT

Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT

Copyright 2023 Louis Royer and the NextMN-SRv6 contributors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. SPDX-License-Identifier: MIT

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControllerRegistry added in v0.0.9

type ControllerRegistry struct {
	WithState
	RemoteControlURI string // URI of the controller
	LocalControlURI  string // URI of the router, used to control it
	Locator          string
	Backbone         netip.Addr
	Resource         string
}

ControllerRegistry registers and unregisters into controller

func NewControllerRegistry added in v0.0.9

func NewControllerRegistry(remoteControlURI string, backbone netip.Addr, locator string, localControlURI string) *ControllerRegistry

Create a new ControllerRegistry

func (*ControllerRegistry) RunExit added in v0.0.9

func (t *ControllerRegistry) RunExit() error

Exit

func (*ControllerRegistry) RunInit added in v0.0.9

func (t *ControllerRegistry) RunInit() error

Init

type FakeTask

type FakeTask struct {
	WithState
}

FakeTask is a dummy task that do nothing

func NewFakeTask

func NewFakeTask() *FakeTask

Create a new FakeTask

func (*FakeTask) RunExit

func (t *FakeTask) RunExit() error

Exit

func (*FakeTask) RunInit

func (t *FakeTask) RunInit() error

Init

type HookMulti

type HookMulti struct {
	WithState
	// contains filtered or unexported fields
}

HookMulti is a Task that runs 2 SingleHook

func NewMultiHook

func NewMultiHook(init *string, exit *string) *HookMulti

Creates a new MultiHook

func (*HookMulti) RunExit

func (h *HookMulti) RunExit() error

Exit function

func (*HookMulti) RunInit

func (h *HookMulti) RunInit() error

Init function

type SingleHook

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

HookSingle

func NewSingleHook

func NewSingleHook(cmd *string) SingleHook

Creates a new SingleHook

func (SingleHook) Run

func (h SingleHook) Run() error

Runs the command of the SingleHook

type TaskBlackhole

type TaskBlackhole struct {
	WithState
	// contains filtered or unexported fields
}

TaskBlackhole

func NewTaskBlackhole

func NewTaskBlackhole(table_name string) *TaskBlackhole

Create a new TaskBlackhole

func (*TaskBlackhole) RunExit

func (t *TaskBlackhole) RunExit() error

Delete blackhole

func (*TaskBlackhole) RunInit

func (t *TaskBlackhole) RunInit() error

Create blackhole

type TaskDummyIface

type TaskDummyIface struct {
	WithState
	// contains filtered or unexported fields
}

TaskDummyIface

func NewTaskDummyIface

func NewTaskDummyIface(name string) *TaskDummyIface

Create a new Task for DummyIface

func (*TaskDummyIface) RunExit

func (t *TaskDummyIface) RunExit() error

Delete the Iface

func (*TaskDummyIface) RunInit

func (t *TaskDummyIface) RunInit() error

Create and set up the Iface

type TaskIPRule

type TaskIPRule struct {
	WithState
	// contains filtered or unexported fields
}

TaskIPRule

func NewTaskIP4Rule

func NewTaskIP4Rule(prefix string, tablename string) *TaskIPRule

Create a new Task for IPRule

func NewTaskIP6Rule

func NewTaskIP6Rule(prefix string, tablename string) *TaskIPRule

Create a new Task for IPRule

func (*TaskIPRule) RunExit

func (t *TaskIPRule) RunExit() error

Delete ip rules

func (*TaskIPRule) RunInit

func (t *TaskIPRule) RunInit() error

Setup ip rules

type TaskLinuxEndpoint

type TaskLinuxEndpoint struct {
	WithState
	// contains filtered or unexported fields
}

TaskLinuxEndpoint creates a new linux endpoint

func NewTaskLinuxEndpoint

func NewTaskLinuxEndpoint(endpoint *config.Endpoint, table_name string, iface_name string) *TaskLinuxEndpoint

Create a new TaskLinuxEndpoint

func (*TaskLinuxEndpoint) RunExit

func (t *TaskLinuxEndpoint) RunExit() error

Exit

func (*TaskLinuxEndpoint) RunInit

func (t *TaskLinuxEndpoint) RunInit() error

Init

type TaskLinuxHeadend

type TaskLinuxHeadend struct {
	WithState
	// contains filtered or unexported fields
}

TaskLinuxHeadend creates a new linux headend

func NewTaskLinuxHeadend

func NewTaskLinuxHeadend(headend *config.Headend, table_name string, iface_name string) *TaskLinuxHeadend

Create a new TaskLinuxHeadend

func (*TaskLinuxHeadend) RunExit

func (t *TaskLinuxHeadend) RunExit() error

Exit

func (*TaskLinuxHeadend) RunInit

func (t *TaskLinuxHeadend) RunInit() error

Init

type TaskLinuxHeadendSetSourceAddress

type TaskLinuxHeadendSetSourceAddress struct {
	WithState
	// contains filtered or unexported fields
}

TaskLinuxHeadendSetSourceAddress

func NewTaskLinuxHeadendSetSourceAddress

func NewTaskLinuxHeadendSetSourceAddress(address string) *TaskLinuxHeadendSetSourceAddress

Create a new TaskLinuxHeadendSetSourceAddress

func (*TaskLinuxHeadendSetSourceAddress) RunExit

Exit

func (*TaskLinuxHeadendSetSourceAddress) RunInit

Init

type TaskNextMNEndpoint

type TaskNextMNEndpoint struct {
	WithState
	// contains filtered or unexported fields
}

TaskNextMNEndpoint creates a new endpoint

func NewTaskNextMNEndpoint

func NewTaskNextMNEndpoint(endpoint *config.Endpoint, table_name string, iface_name string, registry app_api.Registry, debug bool) *TaskNextMNEndpoint

Create a new TaskNextMNEndpoint

func (*TaskNextMNEndpoint) RunExit

func (t *TaskNextMNEndpoint) RunExit() error

Exit

func (*TaskNextMNEndpoint) RunInit

func (t *TaskNextMNEndpoint) RunInit() error

Init

type TaskNextMNHeadend

type TaskNextMNHeadend struct {
	WithState
	// contains filtered or unexported fields
}

TaskNextMNHeadend creates a new headend

func NewTaskNextMNHeadend

func NewTaskNextMNHeadend(headend *config.Headend, table_name string, iface_name string, registry app_api.Registry, debug bool) *TaskNextMNHeadend

Create a new TaskNextMNHeadend

func (*TaskNextMNHeadend) RunExit

func (t *TaskNextMNHeadend) RunExit() error

Exit

func (*TaskNextMNHeadend) RunInit

func (t *TaskNextMNHeadend) RunInit() error

Init

type TaskTunIface

type TaskTunIface struct {
	WithState
	// contains filtered or unexported fields
}

TaskTunIface

func NewTaskTunIface

func NewTaskTunIface(name string, registry app_api.Registry) *TaskTunIface

Create a new Task for TunIface

func (*TaskTunIface) RunExit

func (t *TaskTunIface) RunExit() error

Delete the Iface

func (*TaskTunIface) RunInit

func (t *TaskTunIface) RunInit() error

Create and set up the Iface

type WithState

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

func NewState

func NewState() WithState

func (*WithState) State

func (ws *WithState) State() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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