service

package
v0.8.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustNewServiceServer added in v0.8.1

func MustNewServiceServer(address string) common.Service

func NewServiceServer

func NewServiceServer(address string) (common.Service, error)

func RegisterService added in v0.4.0

func RegisterService(s common.Service, srv Service)

func RegisterSubscriber added in v0.3.0

func RegisterSubscriber(s common.Service, subscriber Subscriptions, pubsubName string)

Types

type Message

type Message struct {
	Text string
}

type Service

type Service interface {
	Echo(ctx context.Context) (*string, error)
	Hello(ctx context.Context, in Message) (*Message, error)
	SomethingWrong(ctx context.Context) (*Message, error)
}

type ServiceClient

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

func NewServiceClient

func NewServiceClient(appID string) (*ServiceClient, error)

func (*ServiceClient) Echo

func (c *ServiceClient) Echo(ctx context.Context) (*string, error)

func (*ServiceClient) Hello

func (c *ServiceClient) Hello(ctx context.Context, in Message) (*Message, error)

func (*ServiceClient) SomethingWrong added in v0.5.0

func (c *ServiceClient) SomethingWrong(ctx context.Context) (*Message, error)

type Subscriptions

type Subscriptions interface {
	SendEmail(ctx context.Context, event UserRegisteredEvent) (bool, error)
}

type UserRegisteredEvent

type UserRegisteredEvent struct {
	Email string
}

Jump to

Keyboard shortcuts

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