client

package
v2.19.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	service.ResourceAggregateClient
	// contains filtered or unexported fields
}

func New

func New(cc grpc.ClientConnInterface, subscriber eventbus.Subscriber) *Client

func (*Client) SyncCreateResource

func (c *Client) SyncCreateResource(ctx context.Context, owner string, req *commands.CreateResourceRequest) (*events.ResourceCreated, error)

SyncCreateResource sends create resource command to resource aggregate and wait for resource created event from eventbus.

func (*Client) SyncDeleteResource

func (c *Client) SyncDeleteResource(ctx context.Context, owner string, req *commands.DeleteResourceRequest) (*events.ResourceDeleted, error)

SyncDeleteResource sends delete resource command to resource aggregate and wait for resource deleted event from eventbus.

func (*Client) SyncRetrieveResource

func (c *Client) SyncRetrieveResource(ctx context.Context, owner string, req *commands.RetrieveResourceRequest) (*events.ResourceRetrieved, error)

SyncRetrieveResource sends retrieve resource command to resource aggregate and wait for resource retrieved event from eventbus.

func (*Client) SyncUpdateDeviceMetadata

func (c *Client) SyncUpdateDeviceMetadata(ctx context.Context, owner string, req *commands.UpdateDeviceMetadataRequest) (*events.DeviceMetadataUpdated, error)

SyncUpdateDeviceMetadata sends update device metadata command to resource aggregate and wait for metadata updated event from eventbus.

func (*Client) SyncUpdateResource

func (c *Client) SyncUpdateResource(ctx context.Context, owner string, req *commands.UpdateResourceRequest) (*events.ResourceUpdated, error)

SyncUpdateResource sends update resource command to resource aggregate and wait for resource updated event from eventbus.

Jump to

Keyboard shortcuts

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