centrifugoKit

package
v3.0.81 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(addrs []string, apiKey string, httpClient *http.Client) (*gocent.Client, error)

NewClient TODO: 待完善

@param addrs e.g.[]string{"http://localhost:8000/api"} @param apiKey centrifugo配置文件中的 api_key 项 @param httpClient 可以为nil(将使用默认值 httpClientKit.DefaultHttpClient)

Types

type GrpcClient added in v3.0.79

type GrpcClient struct {
}

func NewGrpcClient added in v3.0.79

func NewGrpcClient(hosts []string) (client *GrpcClient, err error)

func (*GrpcClient) Batch added in v3.0.81

func (client *GrpcClient) Batch(ctx context.Context) error

func (*GrpcClient) Broadcast added in v3.0.79

func (client *GrpcClient) Broadcast(ctx context.Context, channels []string, data []byte) error

func (*GrpcClient) Presence added in v3.0.81

func (client *GrpcClient) Presence(ctx context.Context, channel string) error

func (*GrpcClient) PresenceStats added in v3.0.81

func (client *GrpcClient) PresenceStats(ctx context.Context, channel string) error

func (*GrpcClient) Publish added in v3.0.79

func (client *GrpcClient) Publish(ctx context.Context, channel string, data []byte) error

Jump to

Keyboard shortcuts

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