From 820b0f237e62f0d188df85da4df7022718d105a4 Mon Sep 17 00:00:00 2001 From: Allen Sun Date: Mon, 25 Sep 2017 19:22:11 +0800 Subject: [PATCH] add VsockCidAllocator in unsuppported os Signed-off-by: Allen Sun --- lib/vsock/vsock_unsupported.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/vsock/vsock_unsupported.go b/lib/vsock/vsock_unsupported.go index 12e77b76..614183a8 100644 --- a/lib/vsock/vsock_unsupported.go +++ b/lib/vsock/vsock_unsupported.go @@ -5,8 +5,16 @@ package vsock import ( "fmt" "net" + "sync" ) +type VsockCidAllocator interface { + sync.Locker + GetCid() (uint32, error) + MarkCidInuse(uint32) bool + ReleaseCid(uint32) +} + func Dial(cid uint32, port uint32) (net.Conn, error) { return nil, fmt.Errorf("vsock is not supported") }