placement

package
v1.2.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_dapr_proto_placement_v1_placement_proto protoreflect.FileDescriptor
View Source
var Placement_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "dapr.proto.placement.v1.Placement",
	HandlerType: (*PlacementServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ReportDaprStatus",
			Handler:       _Placement_ReportDaprStatus_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "dapr/proto/placement/v1/placement.proto",
}

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

Functions

func RegisterPlacementServer added in v0.8.0

func RegisterPlacementServer(s grpc.ServiceRegistrar, srv PlacementServer)

Types

type Host

type Host struct {
	Name     string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Port     int64    `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	Load     int64    `protobuf:"varint,3,opt,name=load,proto3" json:"load,omitempty"`
	Entities []string `protobuf:"bytes,4,rep,name=entities,proto3" json:"entities,omitempty"`
	Id       string   `protobuf:"bytes,5,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*Host) Descriptor deprecated

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

Deprecated: Use Host.ProtoReflect.Descriptor instead.

func (*Host) GetEntities

func (x *Host) GetEntities() []string

func (*Host) GetId

func (x *Host) GetId() string

func (*Host) GetLoad

func (x *Host) GetLoad() int64

func (*Host) GetName

func (x *Host) GetName() string

func (*Host) GetPort

func (x *Host) GetPort() int64

func (*Host) ProtoMessage

func (*Host) ProtoMessage()

func (*Host) ProtoReflect added in v1.0.0

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

func (*Host) Reset

func (x *Host) Reset()

func (*Host) String

func (x *Host) String() string

type PlacementClient added in v0.8.0

type PlacementClient interface {
	ReportDaprStatus(ctx context.Context, opts ...grpc.CallOption) (Placement_ReportDaprStatusClient, error)
}

PlacementClient is the client API for Placement 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 NewPlacementClient added in v0.8.0

func NewPlacementClient(cc grpc.ClientConnInterface) PlacementClient

type PlacementOrder

type PlacementOrder struct {
	Tables    *PlacementTables `protobuf:"bytes,1,opt,name=tables,proto3" json:"tables,omitempty"`
	Operation string           `protobuf:"bytes,2,opt,name=operation,proto3" json:"operation,omitempty"`
	// contains filtered or unexported fields
}

func (*PlacementOrder) Descriptor deprecated

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

Deprecated: Use PlacementOrder.ProtoReflect.Descriptor instead.

func (*PlacementOrder) GetOperation

func (x *PlacementOrder) GetOperation() string

func (*PlacementOrder) GetTables

func (x *PlacementOrder) GetTables() *PlacementTables

func (*PlacementOrder) ProtoMessage

func (*PlacementOrder) ProtoMessage()

func (*PlacementOrder) ProtoReflect added in v1.0.0

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

func (*PlacementOrder) Reset

func (x *PlacementOrder) Reset()

func (*PlacementOrder) String

func (x *PlacementOrder) String() string

type PlacementServer added in v0.8.0

type PlacementServer interface {
	ReportDaprStatus(Placement_ReportDaprStatusServer) error
}

PlacementServer is the server API for Placement service. All implementations should embed UnimplementedPlacementServer for forward compatibility

type PlacementTable

type PlacementTable struct {
	Hosts     map[uint64]string `` /* 152-byte string literal not displayed */
	SortedSet []uint64          `protobuf:"varint,2,rep,packed,name=sorted_set,json=sortedSet,proto3" json:"sorted_set,omitempty"`
	LoadMap   map[string]*Host  `` /* 170-byte string literal not displayed */
	TotalLoad int64             `protobuf:"varint,4,opt,name=total_load,json=totalLoad,proto3" json:"total_load,omitempty"`
	// contains filtered or unexported fields
}

func (*PlacementTable) Descriptor deprecated

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

Deprecated: Use PlacementTable.ProtoReflect.Descriptor instead.

func (*PlacementTable) GetHosts

func (x *PlacementTable) GetHosts() map[uint64]string

func (*PlacementTable) GetLoadMap

func (x *PlacementTable) GetLoadMap() map[string]*Host

func (*PlacementTable) GetSortedSet

func (x *PlacementTable) GetSortedSet() []uint64

func (*PlacementTable) GetTotalLoad

func (x *PlacementTable) GetTotalLoad() int64

func (*PlacementTable) ProtoMessage

func (*PlacementTable) ProtoMessage()

func (*PlacementTable) ProtoReflect added in v1.0.0

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

func (*PlacementTable) Reset

func (x *PlacementTable) Reset()

func (*PlacementTable) String

func (x *PlacementTable) String() string

type PlacementTables

type PlacementTables struct {
	Entries map[string]*PlacementTable `` /* 155-byte string literal not displayed */
	Version string                     `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*PlacementTables) Descriptor deprecated

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

Deprecated: Use PlacementTables.ProtoReflect.Descriptor instead.

func (*PlacementTables) GetEntries

func (x *PlacementTables) GetEntries() map[string]*PlacementTable

func (*PlacementTables) GetVersion

func (x *PlacementTables) GetVersion() string

func (*PlacementTables) ProtoMessage

func (*PlacementTables) ProtoMessage()

func (*PlacementTables) ProtoReflect added in v1.0.0

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

func (*PlacementTables) Reset

func (x *PlacementTables) Reset()

func (*PlacementTables) String

func (x *PlacementTables) String() string

type Placement_ReportDaprStatusClient added in v0.8.0

type Placement_ReportDaprStatusClient interface {
	Send(*Host) error
	Recv() (*PlacementOrder, error)
	grpc.ClientStream
}

type Placement_ReportDaprStatusServer added in v0.8.0

type Placement_ReportDaprStatusServer interface {
	Send(*PlacementOrder) error
	Recv() (*Host, error)
	grpc.ServerStream
}

type UnimplementedPlacementServer added in v0.8.0

type UnimplementedPlacementServer struct {
}

UnimplementedPlacementServer should be embedded to have forward compatible implementations.

func (UnimplementedPlacementServer) ReportDaprStatus added in v0.8.0

type UnsafePlacementServer added in v1.0.0

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

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

Jump to

Keyboard shortcuts

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