# delete all tags on remote
git tag -l | xargs -I {} git push origin :refs/tags/{}
# delete all tags locally
git tag -l | xargs git tag -d# get and verify runs by last run time
# workflow ID can be replaced with file name
gh api -q '.workflow_runs[].created_at' /repos/:owner/:repo/actions/workflows/govmomi-tests.yaml/runs
# delete them
gh api -q '.workflow_runs[].id' /repos/:owner/:repo/actions/workflows/govmomi-tests.yaml/runs | xargs -I {} gh api -X DELETE /repos/:owner/:repo/actions/runs/{}Example vSphere Alarm events sent from VMware Event Router and enriched with the vSphere Alarm Server
Configuration rule in UI: "IF Datastore Disk Usage IS ABOVE 5% TRIGGER THE ALARM AND Show as Warning"
id:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # golang:1.16.0-buster amd64 | |
| FROM golang@sha256:f254180c5defa2653955e963fb0626e3d4fbbb162f7cff6490e94607d1d867ff AS builder | |
| WORKDIR /src | |
| COPY go.mod . | |
| COPY go.sum . | |
| RUN go mod download | |
| RUN groupadd -g 61000 vcsim | |
| RUN useradd -g 61000 -l -m -s /bin/false -u 61000 vcsim |
# DrsPoweredOnEvent
{'attributes': {'specversion': '1.0', 'id': '8583', 'source': '10.161.153.226', 'type': 'com.vmware.vsphere.DrsVmPoweredOnEvent', 'datacontenttype': 'application/xml', 'time': '2021-02-04T08:53:57.182999Z', 'eventclass': 'event'}, 'data': b'<DrsVmPoweredOnEvent><key>8583</key><chainId>8577</chainId><createdTime>2021-02-04T08:53:57.182999Z</createdTime><userName>VSPHERE.LOCAL\\Administrator</userName><datacenter><name>vcqaDC</name><datacenter type="Datacenter">datacenter-2</datacenter></datacenter><computeResource><name>cls</name><computeResource type="ClusterComputeResource">domain-c7</computeResource></computeResource><host><name>10.161.139.167</name><host type="HostSystem">host-27</host></host><vm><name>test-01</name><vm type="VirtualMachine">vm-56</vm></vm><fullFormattedMessage>DRS powered On test-01 on 10.161.139.167 in vcqaDC</fullFormattedMessage><template>false</template></DrsVmPoweredOnEvent>'}# EventEx
{'attributes': {'specversion': '1.0', 'id': '8574', 'sour
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import "sync" | |
| type MetricEnum int | |
| type Metric struct { | |
| Value float64 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // inspired by | |
| // https://github.com/golang/go/blob/8d7be1e3c9a98191f8c900087025c5e78b73d962/src/text/template/parse/lex.go#L228 | |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| ) | |
| type stateFn func(s *state) stateFn |
go test -bench=. -benchmem
goos: darwin
goarch: amd64
pkg: fmt-perf
BenchmarkFmtV-16 6899274 174 ns/op 64 B/op 1 allocs/op
BenchmarkFmtS-16 9181304 129 ns/op 80 B/op 2 allocs/op
PASS
ok fmt-perf 4.138s
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "context" | |
| "grpc-tutorial/greeter" | |
| "io" | |
| "log" | |
| "os" | |
| "os/signal" | |
| "sync" |