Documentation ¶
Index ¶
- Variables
- func FileDescriptorSet() *descriptorpb.FileDescriptorSet
- func RegisterKarteServer(s prpc.Registrar, srv KarteServer)
- type Action
- type CreateActionRequest
- func (*CreateActionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateActionRequest) GetAction() *Action
- func (*CreateActionRequest) ProtoMessage()
- func (x *CreateActionRequest) ProtoReflect() protoreflect.Message
- func (x *CreateActionRequest) Reset()
- func (x *CreateActionRequest) String() string
- type CreateObservationRequest
- type KarteClient
- type KarteServer
- type ListActionsRequest
- func (*ListActionsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListActionsRequest) GetPageSize() int32
- func (x *ListActionsRequest) GetPageToken() string
- func (*ListActionsRequest) ProtoMessage()
- func (x *ListActionsRequest) ProtoReflect() protoreflect.Message
- func (x *ListActionsRequest) Reset()
- func (x *ListActionsRequest) String() string
- type ListActionsResponse
- func (*ListActionsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListActionsResponse) GetActions() []*Action
- func (x *ListActionsResponse) GetNextPageToken() string
- func (*ListActionsResponse) ProtoMessage()
- func (x *ListActionsResponse) ProtoReflect() protoreflect.Message
- func (x *ListActionsResponse) Reset()
- func (x *ListActionsResponse) String() string
- type ListObservationsRequest
- func (*ListObservationsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListObservationsRequest) GetPageSize() int32
- func (x *ListObservationsRequest) GetPageToken() string
- func (*ListObservationsRequest) ProtoMessage()
- func (x *ListObservationsRequest) ProtoReflect() protoreflect.Message
- func (x *ListObservationsRequest) Reset()
- func (x *ListObservationsRequest) String() string
- type ListObservationsResponse
- func (*ListObservationsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListObservationsResponse) GetNextPageToken() string
- func (x *ListObservationsResponse) GetObservations() []*Observation
- func (*ListObservationsResponse) ProtoMessage()
- func (x *ListObservationsResponse) ProtoReflect() protoreflect.Message
- func (x *ListObservationsResponse) Reset()
- func (x *ListObservationsResponse) String() string
- type Observation
- type UnimplementedKarteServer
- func (*UnimplementedKarteServer) CreateAction(context.Context, *CreateActionRequest) (*Action, error)
- func (*UnimplementedKarteServer) CreateObservation(context.Context, *CreateObservationRequest) (*Observation, error)
- func (*UnimplementedKarteServer) ListActions(context.Context, *ListActionsRequest) (*ListActionsResponse, error)
- func (*UnimplementedKarteServer) ListObservations(context.Context, *ListObservationsRequest) (*ListObservationsResponse, error)
Constants ¶
This section is empty.
Variables ¶
var File_infra_cros_karte_api_action_proto protoreflect.FileDescriptor
var File_infra_cros_karte_api_observation_proto protoreflect.FileDescriptor
var File_infra_cros_karte_api_service_proto protoreflect.FileDescriptor
Functions ¶
func FileDescriptorSet ¶
func FileDescriptorSet() *descriptorpb.FileDescriptorSet
FileDescriptorSet returns a descriptor set for this proto package, which includes all defined services, and all transitive dependencies.
Will not return nil.
Do NOT modify the returned descriptor.
func RegisterKarteServer ¶
func RegisterKarteServer(s prpc.Registrar, srv KarteServer)
Types ¶
type Action ¶
type Action struct { // The resource name of the action. Names are generated // automatically when a new action is created. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // A kind is a coarse-grained type of an action, such as // ssh-attempt. New action_kinds will be created frequently so this field // is a string; see https://google.aip.dev/126 for details. Kind string `protobuf:"bytes,3,opt,name=kind,proto3" json:"kind,omitempty"` // contains filtered or unexported fields }
An action represents an event performed on a DUT. Examples include running a command on a DUT or resetting the servo attached to a DUT.
Next Tag: 4
func (*Action) Descriptor
deprecated
func (*Action) ProtoMessage ¶
func (*Action) ProtoMessage()
func (*Action) ProtoReflect ¶
func (x *Action) ProtoReflect() protoreflect.Message
type CreateActionRequest ¶
type CreateActionRequest struct { // An action is the action record being created. Action *Action `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"` // contains filtered or unexported fields }
CreateActionRequest creates a single action.
func (*CreateActionRequest) Descriptor
deprecated
func (*CreateActionRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateActionRequest.ProtoReflect.Descriptor instead.
func (*CreateActionRequest) GetAction ¶
func (x *CreateActionRequest) GetAction() *Action
func (*CreateActionRequest) ProtoMessage ¶
func (*CreateActionRequest) ProtoMessage()
func (*CreateActionRequest) ProtoReflect ¶
func (x *CreateActionRequest) ProtoReflect() protoreflect.Message
func (*CreateActionRequest) Reset ¶
func (x *CreateActionRequest) Reset()
func (*CreateActionRequest) String ¶
func (x *CreateActionRequest) String() string
type CreateObservationRequest ¶
type CreateObservationRequest struct {
// contains filtered or unexported fields
}
CreateObservationRequest creates a single action. TODO(gregorynisbet): Make the observation request non-empty.
func (*CreateObservationRequest) Descriptor
deprecated
func (*CreateObservationRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateObservationRequest.ProtoReflect.Descriptor instead.
func (*CreateObservationRequest) ProtoMessage ¶
func (*CreateObservationRequest) ProtoMessage()
func (*CreateObservationRequest) ProtoReflect ¶
func (x *CreateObservationRequest) ProtoReflect() protoreflect.Message
func (*CreateObservationRequest) Reset ¶
func (x *CreateObservationRequest) Reset()
func (*CreateObservationRequest) String ¶
func (x *CreateObservationRequest) String() string
type KarteClient ¶
type KarteClient interface { // CreateAction creates an action and returns the action just created. CreateAction(ctx context.Context, in *CreateActionRequest, opts ...grpc.CallOption) (*Action, error) // CreateObservation creates an observation and returns the observation // that was just created. // This API is based on https://google.aip.dev/133. CreateObservation(ctx context.Context, in *CreateObservationRequest, opts ...grpc.CallOption) (*Observation, error) // ListActions lists all the actions that Karte knows about. // The order in which the actions are returned is undefined. ListActions(ctx context.Context, in *ListActionsRequest, opts ...grpc.CallOption) (*ListActionsResponse, error) // ListObservations lists all the observations that Karte knows about. // The order in which the observations are returned is undefined. ListObservations(ctx context.Context, in *ListObservationsRequest, opts ...grpc.CallOption) (*ListObservationsResponse, error) }
KarteClient is the client API for Karte service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewKarteClient ¶
func NewKarteClient(cc grpc.ClientConnInterface) KarteClient
func NewKartePRPCClient ¶
func NewKartePRPCClient(client *prpc.Client) KarteClient
type KarteServer ¶
type KarteServer interface { // CreateAction creates an action and returns the action just created. CreateAction(context.Context, *CreateActionRequest) (*Action, error) // CreateObservation creates an observation and returns the observation // that was just created. // This API is based on https://google.aip.dev/133. CreateObservation(context.Context, *CreateObservationRequest) (*Observation, error) // ListActions lists all the actions that Karte knows about. // The order in which the actions are returned is undefined. ListActions(context.Context, *ListActionsRequest) (*ListActionsResponse, error) // ListObservations lists all the observations that Karte knows about. // The order in which the observations are returned is undefined. ListObservations(context.Context, *ListObservationsRequest) (*ListObservationsResponse, error) }
KarteServer is the server API for Karte service.
type ListActionsRequest ¶
type ListActionsRequest struct { // The maximum number of actions to return. The service may return fewer than // this value. // If unspecified, at most 50 actions will be returned. // The maximum value is 1000; values above 1000 will be coerced to 1000. PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // A page token, received from a previous `ListActions` call. // Provide this to retrieve the subsequent page. // // When paginating, all other parameters provided to `ListActions` must match // the call that provided the page token. PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // contains filtered or unexported fields }
ListActionsRequest takes a page size and a token indicating where to start.
func (*ListActionsRequest) Descriptor
deprecated
func (*ListActionsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListActionsRequest.ProtoReflect.Descriptor instead.
func (*ListActionsRequest) GetPageSize ¶
func (x *ListActionsRequest) GetPageSize() int32
func (*ListActionsRequest) GetPageToken ¶
func (x *ListActionsRequest) GetPageToken() string
func (*ListActionsRequest) ProtoMessage ¶
func (*ListActionsRequest) ProtoMessage()
func (*ListActionsRequest) ProtoReflect ¶
func (x *ListActionsRequest) ProtoReflect() protoreflect.Message
func (*ListActionsRequest) Reset ¶
func (x *ListActionsRequest) Reset()
func (*ListActionsRequest) String ¶
func (x *ListActionsRequest) String() string
type ListActionsResponse ¶
type ListActionsResponse struct { // These are all the actions fitting the criteria specified. Currently, no // criteria can be provided, so every action matches. Actions []*Action `protobuf:"bytes,1,rep,name=actions,proto3" json:"actions,omitempty"` // This is the page token that is needed for pagination. This token // must be supplied verbatim to subsequent calls to ListActions. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // contains filtered or unexported fields }
ListActionsResponse returns the actions in question and returns a page token indicating where to start looking in the next search. The page token will be empty if and only if we have reached the end of the results.
func (*ListActionsResponse) Descriptor
deprecated
func (*ListActionsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListActionsResponse.ProtoReflect.Descriptor instead.
func (*ListActionsResponse) GetActions ¶
func (x *ListActionsResponse) GetActions() []*Action
func (*ListActionsResponse) GetNextPageToken ¶
func (x *ListActionsResponse) GetNextPageToken() string
func (*ListActionsResponse) ProtoMessage ¶
func (*ListActionsResponse) ProtoMessage()
func (*ListActionsResponse) ProtoReflect ¶
func (x *ListActionsResponse) ProtoReflect() protoreflect.Message
func (*ListActionsResponse) Reset ¶
func (x *ListActionsResponse) Reset()
func (*ListActionsResponse) String ¶
func (x *ListActionsResponse) String() string
type ListObservationsRequest ¶
type ListObservationsRequest struct { // The maximum number of observations to return. The service may return fewer than // this value. // If unspecified, at most 50 observations will be returned. // The maximum value is 1000; values above 1000 will be coerced to 1000. PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // A page token, received from a previous `ListObservations` call. // Provide this to retrieve the subsequent page. // // When paginating, all other parameters provided to `ListObservations` must match // the call that provided the page token. PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // contains filtered or unexported fields }
ListObservationsRequest take a page size and a token indicating where to start.
func (*ListObservationsRequest) Descriptor
deprecated
func (*ListObservationsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListObservationsRequest.ProtoReflect.Descriptor instead.
func (*ListObservationsRequest) GetPageSize ¶
func (x *ListObservationsRequest) GetPageSize() int32
func (*ListObservationsRequest) GetPageToken ¶
func (x *ListObservationsRequest) GetPageToken() string
func (*ListObservationsRequest) ProtoMessage ¶
func (*ListObservationsRequest) ProtoMessage()
func (*ListObservationsRequest) ProtoReflect ¶
func (x *ListObservationsRequest) ProtoReflect() protoreflect.Message
func (*ListObservationsRequest) Reset ¶
func (x *ListObservationsRequest) Reset()
func (*ListObservationsRequest) String ¶
func (x *ListObservationsRequest) String() string
type ListObservationsResponse ¶
type ListObservationsResponse struct { // These are all the actions fitting the criteria specified. Currently, no // criteria can be provided, so every action matches. Observations []*Observation `protobuf:"bytes,1,rep,name=observations,proto3" json:"observations,omitempty"` // This is the page token that is needed for pagination. This token // must be supplied verbatim to subsequent calls to ListActions. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` // contains filtered or unexported fields }
ListObservationsResponse returns the observations in quetoin and returns a page token indicating where to start looking in the next search. The page token will be empty if and only if we have reached the end of the results.
func (*ListObservationsResponse) Descriptor
deprecated
func (*ListObservationsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListObservationsResponse.ProtoReflect.Descriptor instead.
func (*ListObservationsResponse) GetNextPageToken ¶
func (x *ListObservationsResponse) GetNextPageToken() string
func (*ListObservationsResponse) GetObservations ¶
func (x *ListObservationsResponse) GetObservations() []*Observation
func (*ListObservationsResponse) ProtoMessage ¶
func (*ListObservationsResponse) ProtoMessage()
func (*ListObservationsResponse) ProtoReflect ¶
func (x *ListObservationsResponse) ProtoReflect() protoreflect.Message
func (*ListObservationsResponse) Reset ¶
func (x *ListObservationsResponse) Reset()
func (*ListObservationsResponse) String ¶
func (x *ListObservationsResponse) String() string
type Observation ¶
type Observation struct { // The resource name of the observation. Names are generated // automatically when a new observation is created. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
An Observation describes a measurement during an action.
Examples:
battery_level:70 - battery level on device is 70% rrd:present - rrd metric is present on device disk_usage:35 - 35% internal storage used
Next Tag: 2
func (*Observation) Descriptor
deprecated
func (*Observation) Descriptor() ([]byte, []int)
Deprecated: Use Observation.ProtoReflect.Descriptor instead.
func (*Observation) GetName ¶
func (x *Observation) GetName() string
func (*Observation) ProtoMessage ¶
func (*Observation) ProtoMessage()
func (*Observation) ProtoReflect ¶
func (x *Observation) ProtoReflect() protoreflect.Message
func (*Observation) Reset ¶
func (x *Observation) Reset()
func (*Observation) String ¶
func (x *Observation) String() string
type UnimplementedKarteServer ¶
type UnimplementedKarteServer struct { }
UnimplementedKarteServer can be embedded to have forward compatible implementations.
func (*UnimplementedKarteServer) CreateAction ¶
func (*UnimplementedKarteServer) CreateAction(context.Context, *CreateActionRequest) (*Action, error)
func (*UnimplementedKarteServer) CreateObservation ¶
func (*UnimplementedKarteServer) CreateObservation(context.Context, *CreateObservationRequest) (*Observation, error)
func (*UnimplementedKarteServer) ListActions ¶
func (*UnimplementedKarteServer) ListActions(context.Context, *ListActionsRequest) (*ListActionsResponse, error)
func (*UnimplementedKarteServer) ListObservations ¶
func (*UnimplementedKarteServer) ListObservations(context.Context, *ListObservationsRequest) (*ListObservationsResponse, error)