Documentation ¶
Overview ¶
Package instructionutil contains utility functions for instructions.
Index ¶
- func FilterInstructionType(instructions *pb.Instructions, instructionType pb.InstructionType) *pb.Instructions
- func InstructionName(invocationID string, instructionID string) string
- func InstructionWithNames(instruction *pb.Instruction, invocationID string) *pb.Instruction
- func InstructionsWithNames(instructions *pb.Instructions, invocationID string) *pb.Instructions
- func RemoveInstructionsContent(instructions *pb.Instructions) *pb.Instructions
- func RemoveInstructionsName(instructions *pb.Instructions) *pb.Instructions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterInstructionType ¶
func FilterInstructionType(instructions *pb.Instructions, instructionType pb.InstructionType) *pb.Instructions
FilterInstructionType only keeps instructions of specific type. If the result instruction is empty after filter, the function will return nil.
func InstructionName ¶
InstructionName returns instruction name given invocationID and instructionID. We used string instead of invocations.ID to avoid circular import with the invocations package.
func InstructionWithNames ¶
func InstructionWithNames(instruction *pb.Instruction, invocationID string) *pb.Instruction
InstructionWithNames populates the instruction with names. We used string instead of invocations.ID to avoid circular import with the invocations package.
func InstructionsWithNames ¶
func InstructionsWithNames(instructions *pb.Instructions, invocationID string) *pb.Instructions
InstructionsWithNames populates the instructions with names. We used string instead of invocations.ID to avoid circular import with the invocations package.
func RemoveInstructionsContent ¶
func RemoveInstructionsContent(instructions *pb.Instructions) *pb.Instructions
RemoveInstructionsContent removes all contents from instructions. This is to reduce the memory footprint.
func RemoveInstructionsName ¶
func RemoveInstructionsName(instructions *pb.Instructions) *pb.Instructions
RemoveInstructionsName removes all names from instructions. This is to be used in create/update invocations. Name is an output-only field, we will not store it in Spanner.
Types ¶
This section is empty.