binding

package
v0.0.0-...-4458701 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Overview

Package binding implements a simple binding that can work with a specific hardware configuration without a reservation system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() (binding.Binding, error)

New creates a new binding that could be either a vendor plugin, a binding configuration file, or a KNE configuration file. This depends on the command line flags given.

The vendor plugin should be a "package main" with a New function that will receive the value of the --plugin-args flag as a string.

package main

import "github.com/openconfig/ondatra/binding"

func New(arg string) (binding.Binding, error) {
  ...
}

And the plugin should be built with:

go build -buildmode=plugin

For more detail about how to write a plugin, see: https://pkg.go.dev/plugin

Types

type NewFunc

type NewFunc func(arg string) (binding.Binding, error)

NewFunc describes the type of the New function that a vendor binding plugin should provide.

Jump to

Keyboard shortcuts

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