cntopo

package
v0.0.0-...-c3af27a Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cntopo

type Cntopo interface {
	GetRings(available []uint, size int) ([]Ring, error)
}

func New

func New() Cntopo

type Input

type Input map[string][]struct {
	Size      int    `json:"num_devices"`
	WhiteList []uint `json:"white_dev_list"`
}

type Output

type Output []struct {
	Info struct {
		Ordinals []uint `json:"ordinal_list"`
	} `json:"info_by_host"`
	// The traffic is duplex, so this value is twice the number of rings,
	// except for the cases of less equal to 2 cards, that is,
	// "A>B>A" conflicts with "B>A>B", while "A>B>C>A" does not conflict with "A>C>B>A"
	NonConflictRings struct {
		Num int `json:"nonconflict_rings_num"`
	} `json:"nonconflict_rings"`
}

type Ring

type Ring struct {
	Ordinals           []uint
	NonConflictRingNum int
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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