當前位置: 首頁>>代碼示例>>Golang>>正文


Golang types.NotImplementedErrorf函數代碼示例

本文整理匯總了Golang中github.com/docker/libnetwork/types.NotImplementedErrorf函數的典型用法代碼示例。如果您正苦於以下問題:Golang NotImplementedErrorf函數的具體用法?Golang NotImplementedErrorf怎麽用?Golang NotImplementedErrorf使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了NotImplementedErrorf函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: getPredefinedPool

func (a *Allocator) getPredefinedPool(as string, ipV6 bool) (*net.IPNet, error) {
	var v ipVersion
	v = v4
	if ipV6 {
		v = v6
	}

	if as != localAddressSpace && as != globalAddressSpace {
		return nil, types.NotImplementedErrorf("no default pool availbale for non-default addresss spaces")
	}

	aSpace, err := a.getAddrSpace(as)
	if err != nil {
		return nil, err
	}

	for _, nw := range a.getPredefineds(as) {
		if v != getAddressVersion(nw.IP) {
			continue
		}
		aSpace.Lock()
		_, ok := aSpace.subnets[SubnetKey{AddressSpace: as, Subnet: nw.String()}]
		aSpace.Unlock()
		if ok {
			continue
		}

		if !aSpace.contains(as, nw) {
			return nw, nil
		}
	}

	return nil, types.NotFoundErrorf("could not find an available, non-overlapping IPv%d address pool among the defaults to assign to the network", v)
}
開發者ID:docker,項目名稱:docker,代碼行數:34,代碼來源:allocator.go

示例2: SetIPAddress

func (ep *endpoint) SetIPAddress(address *net.IPNet) error {
	if address.IP == nil {
		return types.BadRequestErrorf("tried to set nil IP address to endpoint interface")
	}
	if address.IP.To4() == nil {
		return types.NotImplementedErrorf("do not support ipv6 yet")
	}
	if ep.addr != nil {
		return types.ForbiddenErrorf("endpoint interface IP present (%s). Cannot be modified with %s.", ep.addr, address)
	}
	ep.addr = types.GetIPNetCopy(address)
	return nil
}
開發者ID:c0b,項目名稱:libnetwork,代碼行數:13,代碼來源:ovrouter.go

示例3: getPredefinedPool

func (a *Allocator) getPredefinedPool(as string, ipV6 bool) (*net.IPNet, error) {
	var v ipVersion
	v = v4
	if ipV6 {
		v = v6
	}

	if as != localAddressSpace && as != globalAddressSpace {
		return nil, types.NotImplementedErrorf("no default pool availbale for non-default addresss spaces")
	}

	aSpace, err := a.getAddrSpace(as)
	if err != nil {
		return nil, err
	}

	for _, nw := range a.getPredefineds(as) {
		if v != getAddressVersion(nw.IP) {
			continue
		}
		aSpace.Lock()
		_, ok := aSpace.subnets[SubnetKey{AddressSpace: as, Subnet: nw.String()}]
		aSpace.Unlock()
		if ok {
			continue
		}

		if !aSpace.contains(as, nw) {
			if as == localAddressSpace {
				// Check if nw overlap with system routes, name servers
				if _, err := ipamutils.FindAvailableNetwork([]*net.IPNet{nw}); err == nil {
					return nw, nil
				}
				continue
			}
			return nw, nil
		}
	}

	return nil, types.NotFoundErrorf("could not find an available predefined network")
}
開發者ID:gao-feng,項目名稱:docker,代碼行數:41,代碼來源:allocator.go

示例4: DiscoverDelete

// DiscoverDelete is a notification for a discovery delete event, such as a node leaving a cluster
func (d *driver) DiscoverDelete(dType discoverapi.DiscoveryType, data interface{}) error {
	return types.NotImplementedErrorf("not implemented")
}
開發者ID:vdemeester,項目名稱:libnetwork,代碼行數:4,代碼來源:ovmanager.go

示例5: Leave

// Leave method is invoked when a Sandbox detaches from an endpoint.
func (d *driver) Leave(nid, eid string) error {
	return types.NotImplementedErrorf("not implemented")
}
開發者ID:vdemeester,項目名稱:libnetwork,代碼行數:4,代碼來源:ovmanager.go

示例6: Join

// Join method is invoked when a Sandbox is attached to an endpoint.
func (d *driver) Join(nid, eid string, sboxKey string, jinfo driverapi.JoinInfo, options map[string]interface{}) error {
	return types.NotImplementedErrorf("not implemented")
}
開發者ID:vdemeester,項目名稱:libnetwork,代碼行數:4,代碼來源:ovmanager.go

示例7: EndpointOperInfo

func (d *driver) EndpointOperInfo(nid, eid string) (map[string]interface{}, error) {
	return nil, types.NotImplementedErrorf("not implemented")
}
開發者ID:vdemeester,項目名稱:libnetwork,代碼行數:3,代碼來源:ovmanager.go

示例8: DeleteEndpoint

func (d *driver) DeleteEndpoint(nid, eid string) error {
	return types.NotImplementedErrorf("not implemented")
}
開發者ID:vdemeester,項目名稱:libnetwork,代碼行數:3,代碼來源:ovmanager.go

示例9: ExecFunc

func (n *network) ExecFunc(f func()) error {
	return types.NotImplementedErrorf("ExecFunc not supported by network")
}
開發者ID:msabansal,項目名稱:libnetwork,代碼行數:3,代碼來源:network.go

示例10: NetworkAllocate

func (d *driver) NetworkAllocate(id string, option map[string]string, ipV4Data, ipV6Data []driverapi.IPAMData) (map[string]string, error) {
	return nil, types.NotImplementedErrorf("not implemented")
}
開發者ID:CadeLaRen,項目名稱:docker-3,代碼行數:3,代碼來源:ipvlan.go

示例11: ElectInterfaceAddresses

// ElectInterfaceAddresses looks for an interface on the OS with the specified name
// and returns its IPv4 and IPv6 addresses in CIDR form. If the interface does not exist,
// it chooses from a predifined list the first IPv4 address which does not conflict
// with other interfaces on the system.
func ElectInterfaceAddresses(name string) (*net.IPNet, []*net.IPNet, error) {
	return nil, nil, types.NotImplementedErrorf("not supported on freebsd")
}
開發者ID:CadeLaRen,項目名稱:docker-3,代碼行數:7,代碼來源:utils_freebsd.go

示例12: ProgramExternalConnectivity

func (d *driver) ProgramExternalConnectivity(nid, eid string, options map[string]interface{}) error {
	return types.NotImplementedErrorf("not implemented")
}
開發者ID:vdemeester,項目名稱:libnetwork,代碼行數:3,代碼來源:ovmanager.go

示例13: processExternalKey

func (c *controller) processExternalKey(conn net.Conn) error {
	return types.NotImplementedErrorf("processExternalKey isn't supported on non linux systems")
}
開發者ID:CadeLaRen,項目名稱:docker-3,代碼行數:3,代碼來源:sandbox_externalkey_windows.go

示例14: processReturn

func processReturn(r io.Reader) error {
	return types.NotImplementedErrorf("processReturn isn't supported on non linux systems")
}
開發者ID:CadeLaRen,項目名稱:docker-3,代碼行數:3,代碼來源:sandbox_externalkey_windows.go

示例15: sendKey

func sendKey(c net.Conn, data setKeyData) error {
	return types.NotImplementedErrorf("sendKey isn't supported on non linux systems")
}
開發者ID:CadeLaRen,項目名稱:docker-3,代碼行數:3,代碼來源:sandbox_externalkey_windows.go


注:本文中的github.com/docker/libnetwork/types.NotImplementedErrorf函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。