mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-13 19:45:26 +00:00
16 lines
312 B
Go
Executable File
16 lines
312 B
Go
Executable File
package example
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/micro/services/clients/go/stream"
|
|
)
|
|
|
|
// List all the active channels
|
|
func ListChannels() {
|
|
streamService := stream.NewStreamService(os.Getenv("MICRO_API_TOKEN"))
|
|
rsp, err := streamService.ListChannels(&stream.ListChannelsRequest{})
|
|
fmt.Println(rsp, err)
|
|
}
|