chatclient

package
v0.0.0-...-16dd1aa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunClient

func RunClient(ctx context.Context, chatInput <-chan string, cl chatterbox.ChatterBoxClient) error

RunClient is an example of a gRPC client for a two-way bidi stream.

func RunMonitor

func RunMonitor(ctx context.Context, cl chatterbox.ChatterBoxClient) error

RunMonitor is an example of a gRPC client for a one-way server stream.

Types

type MembersClient

type MembersClient struct {
	// contains filtered or unexported fields
}

func (*MembersClient) Run

func (mc *MembersClient) Run(ctx context.Context) error

Run runs this MembersClient in the foreground until ctx is cancelled.

func (*MembersClient) Start

func (mc *MembersClient) Start(ctx context.Context) error

Start this MembersClient. Fetches the initial state synchronously, then background monitors until ctx is cancelled.

type MembersMonitor

type MembersMonitor struct {
	// contains filtered or unexported fields
}

func (*MembersMonitor) GetMembers

func (mm *MembersMonitor) GetMembers() []string

GetMembers returns the current list of members (at all times) to the rest of the application.

func (*MembersMonitor) Run

func (mm *MembersMonitor) Run(ctx context.Context) error

Run runs this MembersMonitor in the foreground until ctx is cancelled.

func (*MembersMonitor) Start

func (mm *MembersMonitor) Start(ctx context.Context) error

Start this MembersMonitor. Fetches the initial state synchronously, then background monitors until ctx is cancelled.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL