https://github.com/tg123/fabric
Service Fabric Golang SDK (Unofficial)
https://github.com/tg123/fabric
sdk service-fabric
Last synced: 6 months ago
JSON representation
Service Fabric Golang SDK (Unofficial)
- Host: GitHub
- URL: https://github.com/tg123/fabric
- Owner: tg123
- License: mit
- Created: 2021-02-23T00:01:41.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-09-01T01:40:52.000Z (about 4 years ago)
- Last Synced: 2025-03-28T07:11:27.056Z (6 months ago)
- Topics: sdk, service-fabric
- Language: Go
- Homepage:
- Size: 1.81 MB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Service Fabric Golang SDK (COM+)
[](https://pkg.go.dev/github.com/tg123/fabric)
## status: UNOFFICIAL and WIP
This is SDK is generated from IDL file in service fabric repo .
The package calls Service Fabric COM+ API directly which is the same to what dotnet SDK does.Working in process and will provide friendly programming experience to Golang users.
Current features:
* BeginXX and EndXX are combined into goroutine style
* common data types, for example `FILETIME`, are mapped into go types## Usage
make sure Service Fabric installed and be visible in your PATH
### Example
```
package mainimport (
"fmt"
"time"ole "github.com/go-ole/go-ole"
"github.com/tg123/fabric"
)func main() {
err := ole.CoInitializeEx(0, ole.COINIT_MULTITHREADED)
if err != nil {
panic(err)
}client, err := fabric.NewX509Client("test.southcentralus.cloudapp.azure.com:19000", fabric.X509Credentials{
FindType: fabric.FabricX509FindTypeFindbythumbprint,
FindValue: "1111111111111111111111111111111111111111",
StoreName: "MY",
StoreLocation: fabric.FabricX509StoreLocationCurrentuser,
RemoteCertThumbprints: []string{"1111111111111111111111111111111111111111"},
})if err != nil {
panic(err)
}nodes, err := client.GetNodeList(context.TODO(), &fabric.FabricNodeQueryDescription{
NodeNameFilter: "",
})if err != nil {
panic(err)
}fmt.Println(nodes)
}
```