glue

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2017 License: Apache-2.0 Imports: 11 Imported by: 8

README

CNI Glue

Simple binding to plug CNI into Rancher and runc hooks.

Building

make

Running

./bin/cniglue

License

Copyright (c) 2014-2016 Rancher Labs, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CniDir  = "/etc/docker/cni/%s.d"
	CniPath = []string{
		"/opt/cni/bin",
		"/var/lib/cni/bin",
		"/usr/local/sbin",
		"/usr/sbin",
		"/sbin",
		"/usr/local/bin",
		"/usr/bin",
		"/bin",
	}
)

Functions

func CNIAdd

func CNIAdd(state *DockerPluginState) (*types.Result, error)

func CNIDel

func CNIDel(state *DockerPluginState) error

Types

type CNIExec

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

func NewCNIExec

func NewCNIExec(state *DockerPluginState) (*CNIExec, error)

func (*CNIExec) Add

func (c *CNIExec) Add(index int) (*types.Result, error)

func (*CNIExec) Del

func (c *CNIExec) Del(index int) error

type DockerPluginState

type DockerPluginState struct {
	ContainerID string
	HostConfig  container.HostConfig
	Config      container.Config
	Pid         int
}

func LookupPluginState

func LookupPluginState(container types.ContainerJSON) (*DockerPluginState, error)

Jump to

Keyboard shortcuts

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