nodeacls

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NodesAllowedACLMutex = &sync.Mutex{}

Functions

func AllowNodes

func AllowNodes(networkID NetworkID, node1, node2 NodeID) (acls.ACLContainer, error)

AllowNode - allow access between two nodes in memory

func AreNodesAllowed

func AreNodesAllowed(networkID NetworkID, node1, node2 NodeID) bool

AreNodesAllowed - checks if nodes are allowed to communicate in their network ACL

func CreateNodeACL

func CreateNodeACL(networkID NetworkID, nodeID NodeID, defaultVal byte) (acls.ACL, error)

CreateNodeACL - inserts or updates a node ACL on given network and adds to state

func DeleteACLContainer

func DeleteACLContainer(network NetworkID) error

DeleteACLContainer - removes an ACLContainer state from db

func DisallowNodes

func DisallowNodes(networkID NetworkID, node1, node2 NodeID) (acls.ACLContainer, error)

DisallowNodes - deny access between two nodes

func FetchAllACLs

func FetchAllACLs(networkID NetworkID) (acls.ACLContainer, error)

FetchAllACLs - fetchs all node

func FetchNodeACL

func FetchNodeACL(networkID NetworkID, nodeID NodeID) (acls.ACL, error)

FetchNodeACL - fetches a specific node's ACL in a given network

func FetchNodeACLJson

func FetchNodeACLJson(networkID NetworkID, nodeID NodeID) (acls.ACLJson, error)

FetchNodeACLJson - fetches a node's acl in given network except returns the json string

func RemoveNodeACL

func RemoveNodeACL(networkID NetworkID, nodeID NodeID) (acls.ACLContainer, error)

RemoveNodeACL - removes a specific Node's ACL, returns the NetworkACL and error

func UpdateNodeACL

func UpdateNodeACL(networkID NetworkID, nodeID NodeID, acl acls.ACL) (acls.ACL, error)

UpdateNodeACL - updates a node's ACL in state

Types

type NetworkID

type NetworkID acls.ContainerID

NetworkID - ACL container based on network ID for nodes

type NodeACL

type NodeACL acls.ACL

NodeACL - interface for NodeACLs

type NodeID

type NodeID acls.AclID

NodeID - node ID for ACLs

Jump to

Keyboard shortcuts

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