Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 820b0f2

Browse files
committed
add VsockCidAllocator in unsuppported os
Signed-off-by: Allen Sun <[email protected]>
1 parent b90227f commit 820b0f2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: lib/vsock/vsock_unsupported.go

+8
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,16 @@ package vsock
55
import (
66
"fmt"
77
"net"
8+
"sync"
89
)
910

11+
type VsockCidAllocator interface {
12+
sync.Locker
13+
GetCid() (uint32, error)
14+
MarkCidInuse(uint32) bool
15+
ReleaseCid(uint32)
16+
}
17+
1018
func Dial(cid uint32, port uint32) (net.Conn, error) {
1119
return nil, fmt.Errorf("vsock is not supported")
1220
}

0 commit comments

Comments
 (0)