- Notifications
You must be signed in to change notification settings - Fork21
Idiomatic Go 9P2000.L client and server, extracted from gVisor for general use
License
NotificationsYou must be signed in to change notification settings
hugelgupf/p9
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
p9 is a Golang 9P2000.L client and server originally written for gVisor. p9supports Windows, BSD, and Linux on most Go-available architectures.
For how to start a server given ap9.Attacher
implementation, seecmd/p9ufs.
For how to implement ap9.Attacher
andp9.File
, see as an examplestaticfs, a simple static file system.Boilerplate templates forp9.File
implementations are intemplatefs.
A test suite for server-sidep9.Attacher
andp9.File
implementations isbeing built atfsimpl/test.
import ("log""net""github.com/hugelgupf/p9/p9")funcmain() {conn,err:=net.Dial("tcp","localhost:8000")iferr!=nil {log.Fatal(err) }// conn can be any net.Conn.client,err:=p9.NewClient(conn)iferr!=nil {log.Fatal(err) }// root will be a p9.File and supports all those operations.root,err:=client.Attach("/")iferr!=nil {log.Fatal(err) }// For example:_,_,attrs,err:=root.GetAttr(p9.AttrMaskAll)iferr!=nil {log.Fatal(err) }log.Printf("Attrs of /: %v",attrs)}
About
Idiomatic Go 9P2000.L client and server, extracted from gVisor for general use
Topics
Resources
License
Stars
Watchers
Forks
Packages0
No packages published