configspec

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MessageRole_name = map[int32]string{
		0: "UNKNOWN_MESSAGE_ROLE",
		1: "COMMAND",
		2: "EVENT",
		3: "TIMEOUT",
	}
	MessageRole_value = map[string]int32{
		"UNKNOWN_MESSAGE_ROLE": 0,
		"COMMAND":              1,
		"EVENT":                2,
		"TIMEOUT":              3,
	}
)

Enum value maps for MessageRole.

View Source
var (
	HandlerType_name = map[int32]string{
		0: "UNKNOWN_HANDLER_TYPE",
		1: "AGGREGATE",
		2: "PROCESS",
		3: "INTEGRATION",
		4: "PROJECTION",
	}
	HandlerType_value = map[string]int32{
		"UNKNOWN_HANDLER_TYPE": 0,
		"AGGREGATE":            1,
		"PROCESS":              2,
		"INTEGRATION":          3,
		"PROJECTION":           4,
	}
)

Enum value maps for HandlerType.

View Source
var ConfigAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "dogma.interop.v1.config.ConfigAPI",
	HandlerType: (*ConfigAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListApplications",
			Handler:    _ConfigAPI_ListApplications_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "github.com/dogmatiq/interopspec/configspec/configapi.proto",
}

ConfigAPI_ServiceDesc is the grpc.ServiceDesc for ConfigAPI service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_github_com_dogmatiq_interopspec_configspec_configapi_proto protoreflect.FileDescriptor

Functions

func RegisterConfigAPIServer

func RegisterConfigAPIServer(s grpc.ServiceRegistrar, srv ConfigAPIServer)

Types

type Application

type Application struct {

	// Identity is the application's identity.
	Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"`
	// GoType is the fully-qualified name of the Go type that provides as the
	// application's implementation.
	GoType string `protobuf:"bytes,2,opt,name=go_type,json=goType,proto3" json:"go_type,omitempty"`
	// Handlers is the set of handlers within the application.
	Handlers []*Handler `protobuf:"bytes,3,rep,name=handlers,proto3" json:"handlers,omitempty"`
	// contains filtered or unexported fields
}

Application represents a Dogma application hosted by the engine on the server.

func (*Application) Descriptor deprecated

func (*Application) Descriptor() ([]byte, []int)

Deprecated: Use Application.ProtoReflect.Descriptor instead.

func (*Application) GetGoType

func (x *Application) GetGoType() string

func (*Application) GetHandlers

func (x *Application) GetHandlers() []*Handler

func (*Application) GetIdentity

func (x *Application) GetIdentity() *Identity

func (*Application) ProtoMessage

func (*Application) ProtoMessage()

func (*Application) ProtoReflect

func (x *Application) ProtoReflect() protoreflect.Message

func (*Application) Reset

func (x *Application) Reset()

func (*Application) String

func (x *Application) String() string

type ConfigAPIClient

type ConfigAPIClient interface {
	// ListApplications returns the full configuration of all applications.
	ListApplications(ctx context.Context, in *ListApplicationsRequest, opts ...grpc.CallOption) (*ListApplicationsResponse, error)
}

ConfigAPIClient is the client API for ConfigAPI service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewConfigAPIClient

func NewConfigAPIClient(cc grpc.ClientConnInterface) ConfigAPIClient

type ConfigAPIServer

type ConfigAPIServer interface {
	// ListApplications returns the full configuration of all applications.
	ListApplications(context.Context, *ListApplicationsRequest) (*ListApplicationsResponse, error)
}

ConfigAPIServer is the server API for ConfigAPI service. All implementations should embed UnimplementedConfigAPIServer for forward compatibility

type Handler

type Handler struct {

	// Identity is the handler's identity.
	Identity *Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"`
	// GoType is the fully-qualified name of the Go type that provides as the
	// handler's implementation.
	GoType string `protobuf:"bytes,2,opt,name=go_type,json=goType,proto3" json:"go_type,omitempty"`
	// Type is the handler's type.
	Type HandlerType `protobuf:"varint,3,opt,name=type,proto3,enum=dogma.interop.v1.config.HandlerType" json:"type,omitempty"`
	// ProducedMessages is the set of messages produced by this handler.
	//
	// The keys are the fully-qualified names of the message's Go type and the
	// value is the role that message plays within the application.
	ProducedMessages map[string]MessageRole `` /* 239-byte string literal not displayed */
	// ConsumedMessages is the set of messages consumed by this handler.
	//
	// The keys are the fully-qualified names of the message's Go type and the
	// value is the role that message plays within the application.
	ConsumedMessages map[string]MessageRole `` /* 239-byte string literal not displayed */
	// contains filtered or unexported fields
}

Handler is a message handler within an application.

func (*Handler) Descriptor deprecated

func (*Handler) Descriptor() ([]byte, []int)

Deprecated: Use Handler.ProtoReflect.Descriptor instead.

func (*Handler) GetConsumedMessages

func (x *Handler) GetConsumedMessages() map[string]MessageRole

func (*Handler) GetGoType

func (x *Handler) GetGoType() string

func (*Handler) GetIdentity

func (x *Handler) GetIdentity() *Identity

func (*Handler) GetProducedMessages

func (x *Handler) GetProducedMessages() map[string]MessageRole

func (*Handler) GetType

func (x *Handler) GetType() HandlerType

func (*Handler) ProtoMessage

func (*Handler) ProtoMessage()

func (*Handler) ProtoReflect

func (x *Handler) ProtoReflect() protoreflect.Message

func (*Handler) Reset

func (x *Handler) Reset()

func (*Handler) String

func (x *Handler) String() string

type HandlerType

type HandlerType int32

HandlerType is an enumeration of the types of handlers that an application can contain.

const (
	HandlerType_UNKNOWN_HANDLER_TYPE HandlerType = 0
	HandlerType_AGGREGATE            HandlerType = 1
	HandlerType_PROCESS              HandlerType = 2
	HandlerType_INTEGRATION          HandlerType = 3
	HandlerType_PROJECTION           HandlerType = 4
)

func (HandlerType) Descriptor

func (HandlerType) Enum

func (x HandlerType) Enum() *HandlerType

func (HandlerType) EnumDescriptor deprecated

func (HandlerType) EnumDescriptor() ([]byte, []int)

Deprecated: Use HandlerType.Descriptor instead.

func (HandlerType) Number

func (x HandlerType) Number() protoreflect.EnumNumber

func (HandlerType) String

func (x HandlerType) String() string

func (HandlerType) Type

type Identity

type Identity struct {

	// Name is the entity's unique name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Key is the entity's immutable, unique key.
	Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

Identity represents the identity of an application or handler.

func (*Identity) Descriptor deprecated

func (*Identity) Descriptor() ([]byte, []int)

Deprecated: Use Identity.ProtoReflect.Descriptor instead.

func (*Identity) GetKey

func (x *Identity) GetKey() string

func (*Identity) GetName

func (x *Identity) GetName() string

func (*Identity) ProtoMessage

func (*Identity) ProtoMessage()

func (*Identity) ProtoReflect

func (x *Identity) ProtoReflect() protoreflect.Message

func (*Identity) Reset

func (x *Identity) Reset()

func (*Identity) String

func (x *Identity) String() string

type ListApplicationsRequest

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

func (*ListApplicationsRequest) Descriptor deprecated

func (*ListApplicationsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListApplicationsRequest.ProtoReflect.Descriptor instead.

func (*ListApplicationsRequest) ProtoMessage

func (*ListApplicationsRequest) ProtoMessage()

func (*ListApplicationsRequest) ProtoReflect

func (x *ListApplicationsRequest) ProtoReflect() protoreflect.Message

func (*ListApplicationsRequest) Reset

func (x *ListApplicationsRequest) Reset()

func (*ListApplicationsRequest) String

func (x *ListApplicationsRequest) String() string

type ListApplicationsResponse

type ListApplicationsResponse struct {
	Applications []*Application `protobuf:"bytes,1,rep,name=applications,proto3" json:"applications,omitempty"`
	// contains filtered or unexported fields
}

func (*ListApplicationsResponse) Descriptor deprecated

func (*ListApplicationsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListApplicationsResponse.ProtoReflect.Descriptor instead.

func (*ListApplicationsResponse) GetApplications

func (x *ListApplicationsResponse) GetApplications() []*Application

func (*ListApplicationsResponse) ProtoMessage

func (*ListApplicationsResponse) ProtoMessage()

func (*ListApplicationsResponse) ProtoReflect

func (x *ListApplicationsResponse) ProtoReflect() protoreflect.Message

func (*ListApplicationsResponse) Reset

func (x *ListApplicationsResponse) Reset()

func (*ListApplicationsResponse) String

func (x *ListApplicationsResponse) String() string

type MessageRole

type MessageRole int32

MessageRole is an enumeration of the roles that a message can play within an application.

const (
	MessageRole_UNKNOWN_MESSAGE_ROLE MessageRole = 0
	MessageRole_COMMAND              MessageRole = 1
	MessageRole_EVENT                MessageRole = 2
	MessageRole_TIMEOUT              MessageRole = 3
)

func (MessageRole) Descriptor

func (MessageRole) Enum

func (x MessageRole) Enum() *MessageRole

func (MessageRole) EnumDescriptor deprecated

func (MessageRole) EnumDescriptor() ([]byte, []int)

Deprecated: Use MessageRole.Descriptor instead.

func (MessageRole) Number

func (x MessageRole) Number() protoreflect.EnumNumber

func (MessageRole) String

func (x MessageRole) String() string

func (MessageRole) Type

type UnimplementedConfigAPIServer

type UnimplementedConfigAPIServer struct {
}

UnimplementedConfigAPIServer should be embedded to have forward compatible implementations.

func (UnimplementedConfigAPIServer) ListApplications

type UnsafeConfigAPIServer added in v0.5.1

type UnsafeConfigAPIServer interface {
	// contains filtered or unexported methods
}

UnsafeConfigAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ConfigAPIServer will result in compilation errors.

Jump to

Keyboard shortcuts

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