Documentation
¶
Index ¶
- Variables
- type Child
- func (*Child) Descriptor() ([]byte, []int)deprecated
- func (x *Child) GetName() string
- func (x *Child) GetPid() *v1.PID
- func (x *Child) GetRestart() Restart
- func (x *Child) GetRestarting() bool
- func (x *Child) GetRestarts() uint32
- func (x *Child) GetSupervisor() bool
- func (*Child) ProtoMessage()
- func (x *Child) ProtoReflect() protoreflect.Message
- func (x *Child) Reset()
- func (x *Child) String() string
- type Children
- type Control
- func (*Control) Descriptor() ([]byte, []int)deprecated
- func (x *Control) GetOp() isControl_Op
- func (x *Control) GetStart() uint64
- func (x *Control) GetStartFrom() *StartFrom
- func (x *Control) GetStop() *v1.PID
- func (x *Control) GetWhichChildren() *emptypb.Empty
- func (*Control) ProtoMessage()
- func (x *Control) ProtoReflect() protoreflect.Message
- func (x *Control) Reset()
- func (x *Control) String() string
- type Control_Start
- type Control_StartFrom
- type Control_Stop
- type Control_WhichChildren
- type Restart
- type StartFrom
- type Started
Constants ¶
This section is empty.
Variables ¶
var ( Restart_name = map[int32]string{ 0: "RESTART_UNSPECIFIED", 1: "RESTART_PERMANENT", 2: "RESTART_TRANSIENT", 3: "RESTART_TEMPORARY", } Restart_value = map[string]int32{ "RESTART_UNSPECIFIED": 0, "RESTART_PERMANENT": 1, "RESTART_TRANSIENT": 2, "RESTART_TEMPORARY": 3, } )
Enum value maps for Restart.
var File_grpcproc_actor_v1_actor_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Child ¶ added in v0.2.0
type Child struct {
// Empty for an anonymous child.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Unset unless the child runs.
Pid *v1.PID `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"`
// A restart owes the child a start, which waits for a process to exit.
Restarting bool `protobuf:"varint,3,opt,name=restarting,proto3" json:"restarting,omitempty"`
Restart Restart `protobuf:"varint,4,opt,name=restart,proto3,enum=grpcproc.actor.v1.Restart" json:"restart,omitempty"`
// How many times the supervisor has restarted it.
Restarts uint32 `protobuf:"varint,5,opt,name=restarts,proto3" json:"restarts,omitempty"`
// The child is a supervisor itself.
Supervisor bool `protobuf:"varint,6,opt,name=supervisor,proto3" json:"supervisor,omitempty"`
// contains filtered or unexported fields
}
func (*Child) Descriptor
deprecated
added in
v0.2.0
func (*Child) GetRestart ¶ added in v0.2.0
func (*Child) GetRestarting ¶ added in v0.2.0
func (*Child) GetRestarts ¶ added in v0.2.0
func (*Child) GetSupervisor ¶ added in v0.2.0
func (*Child) ProtoMessage ¶ added in v0.2.0
func (*Child) ProtoMessage()
func (*Child) ProtoReflect ¶ added in v0.2.0
func (x *Child) ProtoReflect() protoreflect.Message
type Children ¶ added in v0.2.0
type Children struct {
Children []*Child `protobuf:"bytes,1,rep,name=children,proto3" json:"children,omitempty"`
// contains filtered or unexported fields
}
Children answers which_children: the supervisor's children, in the order it starts them.
func (*Children) Descriptor
deprecated
added in
v0.2.0
func (*Children) GetChildren ¶ added in v0.2.0
func (*Children) ProtoMessage ¶ added in v0.2.0
func (*Children) ProtoMessage()
func (*Children) ProtoReflect ¶ added in v0.2.0
func (x *Children) ProtoReflect() protoreflect.Message
type Control ¶
type Control struct {
// Types that are valid to be assigned to Op:
//
// *Control_Start
// *Control_Stop
// *Control_WhichChildren
// *Control_StartFrom
Op isControl_Op `protobuf_oneof:"op"`
// contains filtered or unexported fields
}
Control asks a supervisor to start a child, to stop one, or which children it has.
func (*Control) Descriptor
deprecated
func (*Control) GetStartFrom ¶ added in v0.3.0
func (*Control) GetWhichChildren ¶ added in v0.2.0
func (*Control) ProtoMessage ¶
func (*Control) ProtoMessage()
func (*Control) ProtoReflect ¶
func (x *Control) ProtoReflect() protoreflect.Message
type Control_Start ¶
type Control_Start struct {
// A child spec its caller registered in the actor package under this
// id. A spec holds Go functions, so only a supervisor on the caller's
// node can start it. Answered with Started.
Start uint64 `protobuf:"varint,1,opt,name=start,proto3,oneof"`
}
type Control_StartFrom ¶ added in v0.3.0
type Control_StartFrom struct {
// A child one of the supervisor's factories builds, from any node.
// Answered with Started.
StartFrom *StartFrom `protobuf:"bytes,4,opt,name=start_from,json=startFrom,proto3,oneof"`
}
type Control_Stop ¶
type Control_WhichChildren ¶ added in v0.2.0
type Restart ¶ added in v0.2.0
type Restart int32
func (Restart) Descriptor ¶ added in v0.2.0
func (Restart) Descriptor() protoreflect.EnumDescriptor
func (Restart) EnumDescriptor
deprecated
added in
v0.2.0
func (Restart) Number ¶ added in v0.2.0
func (x Restart) Number() protoreflect.EnumNumber
func (Restart) Type ¶ added in v0.2.0
func (Restart) Type() protoreflect.EnumType
type StartFrom ¶ added in v0.3.0
type StartFrom struct {
Factory string `protobuf:"bytes,1,opt,name=factory,proto3" json:"factory,omitempty"`
Arg *anypb.Any `protobuf:"bytes,2,opt,name=arg,proto3" json:"arg,omitempty"`
// contains filtered or unexported fields
}
StartFrom names a factory of the supervisor's Spec, and the argument it builds a child spec from.
func (*StartFrom) Descriptor
deprecated
added in
v0.3.0
func (*StartFrom) GetFactory ¶ added in v0.3.0
func (*StartFrom) ProtoMessage ¶ added in v0.3.0
func (*StartFrom) ProtoMessage()
func (*StartFrom) ProtoReflect ¶ added in v0.3.0
func (x *StartFrom) ProtoReflect() protoreflect.Message
type Started ¶ added in v0.2.0
type Started struct {
Pid *v1.PID `protobuf:"bytes,1,opt,name=pid,proto3" json:"pid,omitempty"`
// A child of the spec's name was running already: pid is that child's,
// and the spec was not started.
Already bool `protobuf:"varint,2,opt,name=already,proto3" json:"already,omitempty"`
// contains filtered or unexported fields
}
Started answers a start with the child's PID.
func (*Started) Descriptor
deprecated
added in
v0.2.0
func (*Started) GetAlready ¶ added in v0.2.0
func (*Started) ProtoMessage ¶ added in v0.2.0
func (*Started) ProtoMessage()
func (*Started) ProtoReflect ¶ added in v0.2.0
func (x *Started) ProtoReflect() protoreflect.Message