client

package
v0.0.0-...-c4c03cf Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BroadcastStream

type BroadcastStream struct {
	pb.Chat_BroadcastClient
	// contains filtered or unexported fields
}

func (*BroadcastStream) JoinChat

func (bs *BroadcastStream) JoinChat(username string) error

func (*BroadcastStream) LeaveChat

func (bs *BroadcastStream) LeaveChat(username string) error

func (*BroadcastStream) MessageListener

func (bs *BroadcastStream) MessageListener(p *tea.Program) error

func (*BroadcastStream) SendMessage

func (bs *BroadcastStream) SendMessage(username string, message string) error

type ChatClient

type ChatClient struct {
	pb.ChatClient
}

func NewChatClient

func NewChatClient(conn *grpc.ClientConn) *ChatClient

func (*ChatClient) Stream

func (cc *ChatClient) Stream(ctx context.Context) (*BroadcastStream, error)

type MessageRecvEvent

type MessageRecvEvent struct {
	Timestamp uint64
	Username  string
	Message   string
}

Jump to

Keyboard shortcuts

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