push

package
v0.0.0-...-91e3901 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGrpcPushCenter

func NewGrpcPushCenter(store *core.NacosDataStorage, sender Sender) (core.PushCenter, error)

func NewUDPPushCenter

func NewUDPPushCenter(store *core.NacosDataStorage) (core.PushCenter, error)

Types

type BasePushCenter

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

func (*BasePushCenter) OnEvent

func (pc *BasePushCenter) OnEvent(ctx context.Context, any2 any) error

OnEvent event process logic

func (*BasePushCenter) PreProcess

func (pc *BasePushCenter) PreProcess(_ context.Context, any any) any

PreProcess do preprocess logic for event

type GRPCNotifier

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

func (*GRPCNotifier) Close

func (c *GRPCNotifier) Close() error

func (*GRPCNotifier) IsZombie

func (c *GRPCNotifier) IsZombie() bool

func (*GRPCNotifier) Notify

func (c *GRPCNotifier) Notify(d *core.PushData)

type GrpcPushCenter

type GrpcPushCenter struct {
	*BasePushCenter
	// contains filtered or unexported fields
}

func (*GrpcPushCenter) AddSubscriber

func (p *GrpcPushCenter) AddSubscriber(s core.Subscriber)

func (*GrpcPushCenter) EnablePush

func (p *GrpcPushCenter) EnablePush(s core.Subscriber) bool

func (*GrpcPushCenter) RemoveSubscriber

func (p *GrpcPushCenter) RemoveSubscriber(s core.Subscriber)

func (*GrpcPushCenter) Type

func (p *GrpcPushCenter) Type() core.PushType

type Notifier

type Notifier interface {
	io.Closer
	Notify(d *core.PushData)
	IsZombie() bool
}

type Sender

type Sender func(sub core.Subscriber, data *core.PushData) error

type UDPAckPacket

type UDPAckPacket struct {
	Type        string
	LastRefTime int64
	Data        string
}

type UDPNotifier

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

func (*UDPNotifier) Close

func (c *UDPNotifier) Close() error

func (*UDPNotifier) IsZombie

func (c *UDPNotifier) IsZombie() bool

func (*UDPNotifier) Notify

func (c *UDPNotifier) Notify(d *core.PushData)

type UdpPushCenter

type UdpPushCenter struct {
	*BasePushCenter
	// contains filtered or unexported fields
}

func (*UdpPushCenter) AddSubscriber

func (p *UdpPushCenter) AddSubscriber(s core.Subscriber)

func (*UdpPushCenter) EnablePush

func (p *UdpPushCenter) EnablePush(s core.Subscriber) bool

func (*UdpPushCenter) RemoveSubscriber

func (p *UdpPushCenter) RemoveSubscriber(s core.Subscriber)

func (*UdpPushCenter) Type

func (p *UdpPushCenter) Type() core.PushType

type WatchClient

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

Jump to

Keyboard shortcuts

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