Golang
What is a B-tree index and why is it most frequently used?
What tools and technologies do you use for organizing logging in your projects?.
What mechanisms are used for asynchronous data copying between databases?
What happens if you try to add an element to a Map that has not been created or initialized?
Where in the project structure is the data interaction layer located?
Explain the principle of data transfer channels in your application.
Can you list the main types of abstractions used in Kafka?
Can you explain what phantom read phenomenon means in the context of transactions?
What is the maximum number of elements you can add using the append method to a given slice without errors or changes to the original data?
What is the maximum number of threads allowed in a single process?
func Copy(src io.Reader, dst io.Writer) error { //... } import gocopy s := file.Open() err := gocopy.Copy(s, d) func Copy(src io.Reader, dst io.Writer) (statusCh, error) { //... go func() { statusCh }() } func Read() { select { case status := <-statusCh: } } type Stat struct { status string err error } func Copy(src io.Reader, dst io.Writer) chan Stat { //... statusCh := make(chan Stat{}) go func() { statusCh{ } } return statusCh } func Read() { select { case status := <-statusCh: } } import gocopy s := file.Open() err := gocopy.Copy(s, d) func Copy(src io.Reader, dst io.Writer) chan Stat { //... statusCh := make(chan Stat{}) buf := make([]byte, 1024) var total int64 go func() { for { n, err := src.Read(buf) if n > 0 { writen, err := dst.Write(buf[:n]) total += int64(writen) if err != nil { statusCh <- Stat{ status: "done with err", err: err, } return } } if err == io.EOF { statusCh <- Stat{ bCopy: total, status: "done", err: nil, } return } if err != nil { statusCh <- Stat{ status: "done with err", err: err, } return } } } return statusCh } func Read() { select { case status := <-statusCh: if status.err != nil { return } } } func Copy(src io.Reader, dst io.Writer) chan Stat { //... statusCh := make(chan Stat{}) buf := make([]byte, 1024) var total int64 go func() { for { select { case : n, err := src.Read(buf) if n > 0 { writen, err := dst.Write(buf[:n]) total += int64(writen) if err != nil { statusCh <- Stat{ status: "done with err", err: err, } return } } if err == io.EOF { statusCh <- Stat{ bCopy: total, status: "done", err: nil, } return } if err != nil { statusCh <- Stat{ status: "done with err", err: err, } return } default: statusCh <- Stat{ bCopy: total, status: "pending", err: nil, } } } } return statusCh } func Read() { select { case status := <-statusCh: if status.err != nil { return } } }
Is it possible to apply multiple locking mechanisms (Mutex) within the same function simultaneously?
What are the differences between RAM that stores data during program execution and shared memory accessible by multiple processes?
What is the difference between goroutines and traditional execution threads?
How is interaction between goroutines carried out using channels in Go?
How does the program behave when trying to send data to a channel that has no elements and uses buffering?
Can you explain the concept of pseudo-parallel processes in programming?
What data structures make up the implementation of key-value mapping in most programming languages?
Tell me more about how you reduced P95 Latency.
What is the difference between replication mechanisms and the master server in a database?