Documentation ¶
Overview ¶
Package resource helps to manage AIP resources (https://google.aip.dev/121).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager tracks resources to support standard AIP methods like Get, Delete, as well as clean up runtime resources when the service exits.
func (*Manager) Close ¶
func (m *Manager) Close()
Close closes the manager and all resources it tracks. Resources added and removed during the Close call may or may not be handled, and resources may be added and removed after calling close. The caller should ensure no more requests can happen before Close is called.
type Resource ¶
type Resource interface { // Close closes the resource. // It corresponds to any cleanup required by the standard AIP Delete method. // It is implementation dependent whether it is safe to call from multiple // goroutines. // The implementation must be safe to call multiple times. Close() error }
Resource represents a resource recommended by go/aip.
Click to show internal directories.
Click to hide internal directories.